Follow

System.InvalidOperationException: Cannot open LicensingManagerService service on computer '.'. When trying to authenticate

Issue

When attempting to do a test authentication to an AuthAnvil server via http://localhost/AuthAnvilSAS/SAS.asmx?op=Authenticate, the authentication fails with the error:

System.InvalidOperationException: Cannot open LicensingManagerService service on computer '.'. ---> System.ComponentModel.Win32Exception: Access is denied

   --- End of inner exception stack trace ---

   at System.ServiceProcess.ServiceController.GetServiceHandle(Int32 desiredAccess)

   at System.ServiceProcess.ServiceController.GenerateStatus()

   at System.ServiceProcess.ServiceController.get_Status()

   at TokenValidator.IsLicensingManagerServiceRunning()

   at TokenValidator.AuthenticateToken(String Username, String Passcode, Int32 tokenType, Int32 SiteID)

   at TokenValidator.Authenticate(String Username, String Passcode, Int32 Tokentype, Int32 SiteID)


Cause

A policy is set somewhere that prevents interprocess communication, meaning that the AuthAnvil Web Service cannot query the status of the AuthAnvil Licensing Manager Service.

 

Resolution

Change the DACL on the LicensingManagerService to explicitly give permissions to the "Authenticated Users" group. This can be done by completing the following procedure (based on the procedure from http://blogs.msdn.com/winsdk/archive/2009/11/18/web-service-can-t-start-the-windows-service.aspx)

  1. Log in to the AuthAnvil Server as Administrator and open a command prompt. 
  2. Run the command SC SDSHOW LicensingManagerService > OldSDofALM.txt
  3. The output in the OldSDofALM.txt file should look something like:  D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
  4. Add the bolded section to the beginning of the line, so that it reads D:(A;;CCLCRPRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU) and save it to NewSDofALM.txt.
  5. In the command prompt run SC SDSET LicensingManagerService1 D:(A;;CCLCRPRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
  6. Do SC SDSHOW LicensingManagerService and compare the output, you should see the newly set string.


Affects

All versions of AuthAnvil.

 

If you have any questions or comments regarding this article please contact us at support@scorpionsoft.com

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk