Filed under ASP.NET 4.0 , Visual Studio
So here's my situation - using Oracle's VirtualBox, I created an instance of Windows Server 2008 R2. I installed IIS 7.5, created a new web site, checked out my code from my subversion repo and got some WCF services running. Because I need SSL, I created a self signed certificate. Easy enough to do, just go into IIS Manager, click on the root server node and on the right hand side under Actions, click "Create Self-Signed Certificate". An excellent source that I followed is in ScottGu's blog
So my services are browsable now inside my virtual machine but outside, I get an security warning inside my browser:
This is because my self-signed certificate is not from a trusted root CA, which means it wasn't assigned by a well-known, trusted organization. So here is the solution. You need to install your self-signed certifcate into the Trust Root Certification Authorities Store.
Bring up your site in your browser (I use IE9) and click on "Continue to this website (not recommended)". Then you should notice a certifcate error next to the address bar. Click on that. Then select View certificates.
You'll see this. Click "Install Certificate".
This launches the Certificate Import Wizard. Chose the option to place all certificates in the following store and select browse:
Choose Trusted Root Certification Authorities. Then click Ok, then Next, then Finish.
You'll get a security warning dialog. Basically says that Windows can't be sure of the origin. But you know it's legit since you created it. So select Yes.
It will then tell you it was successful.
Verify that your certificate has been installed by loading the certificates snap-in in MMC.
Now close down your browser, restart, and call up your site. No more security warnings.
Hope that helps somebody.