CryptographicException

Mar 25, 2013 at 12:25 AM
Bok,

Dobivam sljedecu gresku prilikom loadanja certifikata na serveru:
System.Security.Cryptography.CryptographicException: An internal error occurred.

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.X509Certificate..ctor(String fileName, String password)
at System.Security.Cryptography.X509Certificates.X509Certificate2..ctor(String fileName, String password)
at Raverus.FiskalizacijaDEV.PopratneFunkcije.Potpisivanje.DohvatiCertifikat(String certifikatDatoteka, String zaporka)

Da li se netko vec susreo s ovim problemom?

Pozdrav i unaprijed zahvaljujem....
Mar 25, 2013 at 6:50 PM
Ja imam isti problem na hosting serveru, na lokalnom serveru/iis-u nema problema, dali se netko susreo sa ovim problemom?
Mar 25, 2013 at 9:59 PM
Na app poolu postavite u Advanced settingsima 'Load user profile' na True.
Nov 22 at 2:58 PM
umjesto Raverus.FiskalizacijaDEV.PopratneFunkcije.Potpisivanje.DohvatiCertifikat(String certifikatDatoteka, String zaporka) treba koristiti

Dim certifikat As New X509Certificates.X509Certificate2(certifikatDatoteka, zaporka, X509Certificates.X509KeyStorageFlags.MachineKeySet)

... IIS ne dozvoljava (ili ne može, nisam siguran) pristup do Personal storea....