-
Intro
For the exercise I am describing here, I am using Windows Server 2012, Visual Studio 2013, ADRMS SDK 2.1 and the ADRMS Interop library sample from https://code.msdn.microsoft.com/AD-RMS-SDK-20-Interop-eb3fbce7
You will need to be certain your versions match up. IF you are using the downloadable VHD sample that’s out there, be very careful on the versions of the SDK. Most I have downloaded are running 1.0 and they cannot be updated. This matters as the interfaces between 1.0 and 2.1 are different in many key functions which will create a lot of pain for developers.
Either way, if you have not done ADRMS coding this can be a steep learning curve. Good Luck, and I hope some of this information helps.
-
Environment prep
Go here: https://msdn.microsoft.com/en-us/library/dn715744(v=vs.85).aspx
Follow the steps IN ORDER. If you do these out of order you will have issues. I traced a bug for 2 days which was a result of a RMS server registry edit being done in the wrong order to an install. If you get them out of order, it is very likely you will not have sufficient permissions to execute any of your code.
-
Prepare your server
Go here: https://msdn.microsoft.com/en-us/library/jj590900(v=vs.85).aspx
Again, do these steps in order. Do not deviate from that order. Also, plan your URLs and other names. The SSL certs (assuming you use SSL) will require the URLS to match. Read the popups and warnings.
If you get this out of order you will need to remove the role altogether, unregister the SPC and start again.
-
Prepare your Client
Go here https://msdn.microsoft.com/en-us/library/jj665790(v=vs.85).aspx
In order perform the proper steps as outlined in the article above
-
Prepare your app
Go here: https://msdn.microsoft.com/en-us/library/hh971319(v=vs.85).aspx
Read the instructions carefully and follow them in order.
-
Do not forget to rebuild your manifest. It is best to do this after each build and ADRMS SDK will kick back an error if you do not.
-
The sample interop code will have you leave the “ConnectionInfo” object null. If you do this, the application may use the “https://<machinename>/_wcms/licensing/” URL and you will get a SSL cert error IF you are all on one box, or you may just get a connection error, or cant find server error. Either way, it is really best if you specify the URL to your ADRMS Licensing folder with a FQDN that matches the one set on your SSL cert.
-
Troubleshooting
These are the obscure errors I could not easily find a fix for. There are plenty others you can run into.
-
Cannot reinstall ADRMS
-
-
While running the ADRMS configuration and trying to recreate the root cluster, you get a message re the SPC still being registered but not available. You will see may blogs and messages guiding you to manually remove the SPC do NOT manually do this. Download the Rights Management toolkit and run ADScpRegister.exe unregisterscp https://rms.domain.com to unregister your SCP. Once you do this, your config should run fine.
-
ADRMS Interop library gives “computer does not have the rights required to perform the specified operation. Update the rights on this computer or contact your administrator” error message when making a ADRMS call.
-
You likely skipped a step or did one out of order when configuring the server. I fought this for 2 days. There was little help out there or references for it. Very little useful from the Fiddler logs or event viewer. In the end, I removed ADRMS from the ADRMS box, removed the SPC, then walked all the mods for configuring the server again and reinstalled the ADRMS role and it worked.