title: Changing the embedded self-signed X.509 Certificate (idsrv3test.pfx) in IdentityServer.v3
body: <p>I'm done configuring IdentityServer.v3 with IdentityManager and everything is working pretty much how I want. The only thing left is changing the X.509 certificate to a custom self-signed one. I am using the <a href="https://github.com/thinktecture/Thinktecture.IdentityServer.v3/blob/master/source/Host/Config/Cert.cs" rel="nofollow">code here</a> to load my embedded certificate. What I'm doing is copying my .pfx file to the config folder and changing the certificate name and password for that pfx in the Cert.cs file. Also, I am setting "Build Action: Embedded Resource" and "Copy to Output Directory: Do not copy" in the new pfx file properties.</p>
  
  <p>When I publish my solution, I getting an application wide error like this.</p>
  
  <pre><code>The system cannot find the file specified.
  
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  
  Exception Details: System.Security.Cryptography.CryptographicException: The system cannot find the file specified.
  </code></pre>
  
  <p>Is there a specific way of creating the pfx file? I created mine using <code>makecert.exe</code> and <code>pvk2pfx.exe</code> files. Also, I am using this certifice for securing the domain on which IDSRV3 is being hosted. Without touching any of certificate configuration, both IdentityServer.v3 and IdentityManager work without errors.</p>
  
  <p>What am I missing here?</p>