System.Security.Cryptography.CryptographicException : The specified network password is not correct. RRS feed

  • Question

  • I get this error on 2003 r2 server when loading X509 certificate from *.pfx file . It works on 2008 server and windows 7

     System.Security.Cryptography.CryptographicException : The specified network password is not correct. 
     at System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(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.X509Certificate..ctor(String fileName)
    at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName)


    Wednesday, February 23, 2011 6:27 PM


  • X509Certificate2 has 2nd constructor which takes password. This is required for windows 2003 and below.Also password should not be more then 32 characters

    • Marked as answer by chintapali Thursday, March 10, 2011 2:05 AM
    Thursday, March 10, 2011 2:05 AM