Configure Secure Socket Layer (SSL) in IIS 7 or IIS 7.5 in Windows 7
Posted by: Suprotim Agarwal ,
on 11/7/2011,
in
Category ASP.NET
Abstract: In this article, we will see how to configure Secure Socket Layer (SSL) in IIS 7.x.
HTTPS is a secure communications channel that is used to exchange sensitive information like User Credentials, Credit Card details etc. between a client computer and a server. It uses SSL which encrypts communication over a network like the internet.
In this article, we will see how to configure Secure Socket Layer (SSL) in IIS 7.x in a Windows 7 machine. To enable SSL in IIS, you must first obtain a certificate that is used to encrypt and decrypt the information transferred over a network.
I assume you have configured IIS 7 on your Windows 7 box and have ASP.NET registered on your IIS server. If you have not yet configured IIS on your Windows 7 box, I strongly suggest you to read these two posts before continuing further
Install IIS 7 on Windows 7
Resolving ASP.NET 4.0 has not been Registered on the Web Server Error
Assuming you are all set, go to Start > All Programs > Accessories > Run. Type Inetmgr and hit enter. This opens up the IIS Manager. In the IIS Manager > Select the root node > Double click ‘Server Certificates’
If you have a list of Server Certificates installed on your server, you will be able to view them now. But it happens that I do not have any on my server. In that I can either ‘Create Certificate Request’ or use a ‘Self-Signed Certificate’ for testing purpose.
Note: If you choose the ‘Create Certificate Request’ option, IIS creates a Base64 encoded request. You can then submit this request to a Certificate Authority (like Verisign) and receive a SSL certificate which can be registered on your web server using the ‘Complete Certificate Request’ that you see in the screenshot above.
However if you choose the ‘Create Self-Signed certificate option, then IIS creates a self-signed certificate for your own server. It is an easy option if you plan to use HTTPS for local testing purpose. Remember that you can access this certificate only from your machine.
We will go ahead with creating a Self-Signed certificate for testing purpose. Click the ‘Create Self-Signed certificate’ link > Enter a friendly name for the certificate request and hit OK.
As you can see in the screenshot below, we have a self-signed certificate that we can use for testing purpose.
The last step is to set the protocol for SSL for your website. To do so, select your website in the IIS Manager > In the Action pane, select Bindings > Add Site Binding
Select the Type https and ‘SampleCert’ as SSL certificate and click OK
Your Website is now SSL enabled. To test, type https://localhost/YourSiteName and you should be able to see the default page.
I hope you liked the article and I thank you for viewing it.
This article has been editorially reviewed by Suprotim Agarwal.
C# and .NET have been around for a very long time, but their constant growth means there’s always more to learn.
We at DotNetCurry are very excited to announce The Absolutely Awesome Book on C# and .NET. This is a 500 pages concise technical eBook available in PDF, ePub (iPad), and Mobi (Kindle).
Organized around concepts, this Book aims to provide a concise, yet solid foundation in C# and .NET, covering C# 6.0, C# 7.0 and .NET Core, with chapters on the latest .NET Core 3.0, .NET Standard and C# 8.0 (final release) too. Use these concepts to deepen your existing knowledge of C# and .NET, to have a solid grasp of the latest in C# and .NET OR to crack your next .NET Interview.
Click here to Explore the Table of Contents or Download Sample Chapters!
Was this article worth reading? Share it with fellow developers too. Thanks!
Suprotim Agarwal, MCSD, MCAD, MCDBA, MCSE, is the founder of
DotNetCurry,
DNC Magazine for Developers,
SQLServerCurry and
DevCurry. He has also authored a couple of books
51 Recipes using jQuery with ASP.NET Controls and
The Absolutely Awesome jQuery CookBook.
Suprotim has received the prestigious Microsoft MVP award for Sixteen consecutive years. In a professional capacity, he is the CEO of A2Z Knowledge Visuals Pvt Ltd, a digital group that offers Digital Marketing and Branding services to businesses, both in a start-up and enterprise environment.
Get in touch with him on Twitter @suprotimagarwal or at LinkedIn