Thursday, November 26, 2015

C# : GetManifestResourceStream returns null on pfx file

I'm playing around with IdentityServer 3 and had some issues with the supplied certificate, So I made my own but the code to load it using GetManifestResourceStream returned null.

The certificate was OK - I could import it, inspect it etc.

WTF? - chat with Mr. Google and turns out you need to right-click on the pfx file in the project / Properties and set "Build Action" to "Embedded Resource".

Enjoy!

No comments: