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)
-
Log in to the AuthAnvil Server as Administrator and open a command prompt.
-
Run the command SC SDSHOW LicensingManagerService > OldSDofALM.txt
-
The output in the OldSDofALM.txt file should look something like: D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
-
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.
-
In the command prompt run SC SDSET LicensingManagerService1 D:(A;;CCLCRPRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)
-
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