1/27/2016 11:43:47 PM

If you get the following error when deploying a website to IIS 7+, you may have to edit your Application Pool (Advanced Settings...) and set the Load User Profile settings to True

System.Security.Cryptography.CryptographicException:

The system cannot find the file specified.

 

   at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)

   at System.Security.Cryptography.X509Certificates.X509Utils._LoadCertFromFile(String fileName, IntPtr password, UInt32 dwFlags, Boolean persistKeySet, SafeCertContextHandle& pCertCtx)

   at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)

   at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password, X509KeyStorageFlags keyStorageFlags)

   at CyberSource.Clients.NVPClient.RunTransaction(Configuration config, Hashtable request)