Hello,
I was surfing the Rights Management ES Help and found a very interesting sample PDF. You can find the Sample file here:
I want exact the same features to be applied in one of my projects but the help is not up-to the .NET Development level and hence, asking the questions. To understand my question in better manner, kindly have a look at the file and you will see this dialog box same as in here:
Any help would be greatly appreciated.
Thank you,
JD
Views
Replies
Total Likes
Regards
Steve
Hello Steve,
Appreciate your quick response.
1. Thank you so much for your reply. I have changed the Welcome Text, Username label and Password label by visiting Display Option under the Rights Management Server Configuration.
2. I have used Encryption Service & Rrights Management Service in order to apply the password on a PDF file. At first, I have used the following code to apply the policy which does not include the Authentication:
Dim rmclient As New RightsManagementService.RightsManagementServiceService
rmclient.Credentials = New System.Net.NetworkCredential("MyUsername", "MyPassword")
Dim inDoc As New RightsManagementService.BLOB()
Dim fs As New FileStream(Server.MapPath("Docs1115.pdf"), FileMode.Open)
Dim len As Integer = fs.Length()
Dim byteArray As Byte() = New Byte(len) {}
fs.Read(byteArray, 0, len)
inDoc.binaryData = byteArray
Dim findPolicy As RightsManagementService.PolicySpec = rmclient.getPolicy("DevelopmentPolicySet", "DevelopmentPolicy")
Dim outBytes As Byte() = rmclient.applyPolicyByPolicyId(inDoc, "Docs1115.pdf", findPolicy.policyId, Nothing, Nothing).binaryData
Dim fsOut As New FileStream(Server.MapPath("PPDF1_Docs1115.pdf"), FileMode.OpenOrCreate)
Dim objBinary As New BinaryWriter(fsOut)
objBinary.Write(outBytes)
fs.Close()
fsOut.Close()
I could not able to do that and hence, has to use the above code for Encryption Service in order to achieve that and here is code for that:
Dim eClient As New EncryptionService.EncryptionServiceService
eClient.Credentials = New System.Net.NetworkCredential("MyUsername", "MyPassword")
Dim inDoc As New EncryptionService.BLOB()
Dim fsIn As New FileStream(Server.MapPath("Docs2132.pdf"), FileMode.Open)
Dim len As Integer = fsIn.Length()
Dim byteArray As Byte() = New Byte(len) {}
Dim outBytes As Byte() = New Byte() {}
fsIn.Read(byteArray, 0, len)
inDoc.binaryData = byteArray
Dim passSpec As New EncryptionService.PasswordEncryptionOptionSpec()
passSpec.encryptOption = EncryptionService.PasswordEncryptionOption.ALL
passSpec.compatability = EncryptionService.PasswordEncryptionCompatability.ACRO_7
passSpec.documentOpenPassword = "documentOpen"
passSpec.permissionPassword = "permission"
Dim outDoc As EncryptionService.BLOB = eClient.encryptPDFUsingPassword(inDoc, passSpec)
Response.Redirect(outDoc.remoteURL)
For some reason, I cannot get any Binary Data for outDoc BLOB variable! Hence, I have to redirect the page to the remoteURL and I am getting following screen for authentication which has randomly created filename! :
To avoid this random one and to achieve the real athentication dialog box, I had this question.
How can I apply authentication with the help of Rights Management Web Service?
3. I want to validate the user against my database and do not want to have 100,000+ users in Rights Management Server. I have a custom Web Service to do so and wanted to know how can I do that on submission?
Views
Replies
Total Likes
Views
Likes
Replies