A quick note about setting up a development server with SSL.
Steps:
- Generate a certificate
- Create an SSL binding to an existing site
- Test the configuration
Generating a Certificate
Note that, if you’ve installed IIS Express, you may already have a certificate (named ‘IIS Express Development Certificate’ ) installed in the store. If you have, and you want to use that one, you can safely skip this section altogether.
- Working in "Internet Information Services Manager", make sure that the root (server) is selected in the left-hand pane.
- In the Features View, double-click ‘Server Certificates’ to open the feature.
- In the ‘Actions’ panel on the right-hand side, click “Create Self-Signed Certificate” and provide a ‘friendly’ name in the dialog that appears: this is there so that you can differentiate one certificate from another.
You should have see a new certificate installed into you certificates list.
Creating an SSL Binding
- Working in "Internet Information Services Manager" again, this time select the site that you want to configure in the left-hand pane.
- In the ‘Actions’ panel on the right-hand side of the window, double-click ‘Bindings’, under the ‘Edit Site’ heading: this will show the ‘Site Bindings’ dialog.
- Click the ‘Add’ button on the dialog to show the ‘Add Site Binding’ window.
- Select ‘https’ from the ‘Type’ dropdown and the certificate that you want to use from the ‘SSL Certificate’ dropdown.
- ‘Ok’ out of the two ‘Add Site Binding’ window, and ‘Close’ the ‘Site Bindings’ dialog. This will return you to the main “Internet Information Services” window.
At this point, you should have an SSL binding to your site.
Testing the Configuration
All that remains to be done now, is to test that the configuration is correct. In the ‘Actions’ panel at the right-hand side of the "Internet Information Services Manager" window, there should be two entries in the ‘Browse Web Site’ section:
- Browse <your-site-name> on *:80 (http)
- Browse *:443 (https)
Clicking on the first of these, you should see the default page for your site served normally via http.
Clicking the second like (https), your browser will normally generate a certificate warning. This is (generally) fine for the development, because you’re using a Self-Signed Certificate.
Accept the certificate warning, and you should see your site served up over SSL.
Note:If you want to force your site to use SSL, simply double-click the ‘SSL Settings’ widget in the Features View for your site on the “Internet Information Services” window, tick the ‘Requires SSL’ checkbox on the ‘SSL Settings’ page that appears, and click ‘Apply’ from the ‘Actions’ panel on the right-hand side.