Accessing Certificates in a windows service
-
I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.
Happy programming!!
-
I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.
Happy programming!!
A service runs before the user logs in, hence it has to run under a different account. It's probably running under the system-account, and that has it's own profile. Open the services, find yours, ask it's properties, go to the second or third tab, and have it run under the users' profile. That should do the trick :)
Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]
-
I need to be able to access a number of certificates in a windows service. The code works fine in a console app, but from a service it can't find the certificate. Is there a special way to install them and open them or both? Any help would be much appreciated.
Happy programming!!
I experienced the same problem when I set up Hudson for building our projects: signtool.exe did not find the certificate for signing our programs. I tried with certmgr.msc to make the certificate available for "local system", but failed. Now Hudson runs on my user account on that machine (see also Eddy's answer), and that works.