ASP.NET – The specified network password is not correct

Try this:

new X509Certificate2(Path, "", X509KeyStorageFlags.MachineKeySet); 

It appears that the X509Certificate2 constructor tries to access the private key store of the local user (even when loading a PFX and the private key is in the PFX). With asp.net, the user profile typically isn’t loaded, so the user key store doesn’t exist. Specifying MachineKeySet tells the constructor to look at the Local Computer key store which always exists.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)