title: HTTP Error 500.30 (Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified.)
body: <p>I am trying to deploy the asp.net core Web API to the IIS. This application works perfectly fine on the Visual studio and also when I run the dll using the dotnet command. This application has the certificate for signing the JWT token. After deploying the application to IIS I am getting &quot;HTTP Error 500.30 - ANCM In-Process Start Failure&quot; and I checked the windows log and error message is</p>
  <p>Host terminated unexpectedly.
  Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: The system cannot find the file specified.at Internal.Cryptography.Pal.CertificatePal.FilterPFXStore(Byte[] rawData, SafePasswordHandle password, PfxCertStoreFlags pfxCertStoreFlags)......</p>
  <p>I checked the file path and file name everything is correct but some reason IIS is not able to load find the certificate file. Also, I checked the permission and it also looks good. Not sure why I am getting this error message</p>
  <p>Also, I ran the same application dll file using the dotnet run command where IIS is pointing to but I am not getting any error. I am getting this error only after deployng to IIS.</p>
  <p>On startup.cs file and configuration method I am getting error on this line.</p>
  <pre><code>var cert = new X509Certificate2(&quot;test_cert.pfx&quot;, pwdFrmVault);
  </code></pre>