System.Security.Cryptography.CryptographicException error resolution with certificate deployment

Source: Internet
Author: User

One, System.Security.Cryptography.CryptographicException: Object Not found

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)
At Httpservice.post (string xml, String URL, Boolean isusecert, Int32 timeout)

Processing method:

IIS Application Pool--Select the configured application pool for your site--right-click on Advanced Configuration--Set load user profile to True. Problem solving

Second, System.Security.Cryptography.CryptographicException: The user's profile is a temporary configuration file.

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)
At Httpservice.post (string xml, String URL, Boolean isusecert, Int32 timeout)

Select Application pool in IIS-Properties-identity-pre-defined account-Local system or local service (more secure)

Report:

      • LocalService -The Local service account is a member of the user group that has the same user rights as the Network Service account, but is restricted to use on the local computer. This account can be used when a worker process in an application pool does not need to access content other than the WEB server it is running on.

      • LocalSystem -The Local System account has all user rights and is one of the members of the Administrators group on the WEB server. You should avoid using the local system account as much as possible, as it poses a more serious security risk to the WEB server.

      • The NetworkService –network Service account is a member of the Users group and has the user rights that are required to run the application. By using the credentials of the computer account, it can interact across the entire Active Directory-based network.

System.Security.Cryptography.CryptographicException error resolution with certificate deployment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.