iis-7.5windows-server-2008-r2cryptoapimscapi

Microsoft CryptoAPI not working in web service on Windows Server 2008 R2


We have a web service that uses the Microsoft Crypto API for encryption. It works fine as a web service on Windows Server 2003. For some reason, it doesn't work as a web service on the Windows Server 2008 R2 that we're trying to move it to, although the same code does work on the server in a regular Windows application (ie: not a web service).

Is there some kind of security setting or something like that which needs to be changed to enable this to work? Something has obviously changed between Windows Server versions. It is a 32 bit web service running under IIS.


Solution

  • We got it figured out. It turns out that the default Application Pool Identity basically has no rights. We set it to run under an identity that has the appropriate rights and now it's working.