Skip to content
Discussion options

You must be logged in to vote

"File not found" can mean two different things here, and the fix depends on which one you're seeing.

1. System.IO.FileNotFoundException: the path itself is wrong.
Under IIS the current directory is not your app folder, so a relative path like "dp.pfx" won't resolve. Use an absolute path, or build one from builder.Environment.ContentRootPath.

2. CryptographicException: The system cannot find the file specified: the classic IIS one, and the likely case given "works on my dev box".
The PFX is read fine, but by default (DefaultKeySet, which is usually the user key set) Windows imports the private key into the current user's key store (X509KeyStorageFlags). An app pool identity often has no lo…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MCFHTAGENTS
Comment options

@SumiyaE
Comment options

Answer selected by MCFHTAGENTS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants