简体   繁体   中英

“The specified network password is not correct” on a certificate without a password, on live server only

I'm using kentor authservices in a SAML service provider project built in asp webforms.

It works great on the development machine but when I put it on the production server (windows 2012 R2, IIS 8), the X509Certificates.X509Utils._LoadCertFromFile call throws an exception "The specified network password is not correct."

Only, the certificate (pfx) has no password and the location it sits in is not secured in any unusual way that I can see, but to be sure i've tried with 'everyone' temporarily granted full access to the folder.

The section of the web config relevant is:

<serviceCertificates>
  <add fileName="~/App_Data/M_SSO_SP.pfx"/>
</serviceCertificates>

Though I don't think it is code related, based on it working fine on the development machine - possibly some server-side problem with the certificate?

Any help would be appreciated greatly.

Looks like getting this error when loading a certificate from file is a known error: ASP.NET - The specified network password is not correct

Kentor.AuthServices doesn't set the MachineKeySet flag as suggested, which it probably should. I've filed an issue in the github repo that it should be fixed. Please follow up on that issue to see when a fix is avilable.

我遇到了同样的问题,在服务器上安装了 pfx 文件后问题解决了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM