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
Views: 141230
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’

IIS 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.

Self Signed Certificate 

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.

Self Signed Certificate Name 

As you can see in the screenshot below, we have a self-signed certificate that we can use for testing purpose.

Sample Cert 

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

Https Site Binding 

Select the Type https and ‘SampleCert’ as SSL certificate and click OK

AddIis Site Binding 

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.

Give me a +1 if you think it was a good article. Thanks!
Recommended Articles
Suprotim Agarwal, ASP.NET Architecture MVP, MCSD, MCAD, MCDBA, MCSE, is the CEO of A2Z Knowledge Visuals Pvt. He primarily works as an Architect Consultant and provides consultancy on how to design and develop .NET centric database solutions.

Suprotim is the founder and primary contributor to DotNetCurry, SQLServerCurry and DevCurry. He has also written an EBook 51 Recipes using jQuery with ASP.NET Controls.

Follow him on twitter @suprotimagarwal


Page copy protected against web site content infringement by Copyscape


User Feedback
Comment posted by Richard K on Monday, November 7, 2011 7:56 PM
I have been thinking about trying https on my asp.net site from a long long time and I think after reading your article I realize that's it not as hard as I thought earlier. Thank you for writing this article and God bless!
Comment posted by Moose Breath on Tuesday, May 22, 2012 3:01 PM
About two months ago, Firefox on both my XP-32 and Win7-32 computers dropped the ability to access SSL pages, simultainiously.  They do not connect through the same ISP as they are in different locations, usually.  I was able to figure out how to turn secure tcp/ip back on in XP, but I cannot find where Microsoft has hidden similar processes in Win7.  Searching local help returns "not found" and on-line help is useless.  Any clues?  I am disabled and can't afford the local repair vendors.
Comment posted by 5674567456746 on Wednesday, October 17, 2012 8:39 AM
46574657674567456745456747sdgfdgsfd
Comment posted by Dan Evans on Tuesday, October 30, 2012 9:38 PM
This was an excellent article on installing ssl certificates on IIS 7. Another perspective with screen by screen shots is at

http://answers.ssl.com/2877/how-do-i-install-an-ssl-certificate-in-microsoft-iis-7

Comment posted by Olga on Wednesday, July 17, 2013 10:46 AM
Very good info...keep it up.
Comment posted by Priya Sharma on Monday, September 16, 2013 3:29 AM
How To Install SSL Certificate In IIS 7.........http://mytecharticle.com/?p=537
Comment posted by Priya Sharma on Monday, September 16, 2013 3:31 AM
How To Install SSL Certificate In IIS 7...http://mytecharticle.com/how-to-install-ssl-certificate-in-iis-7/
Comment posted by Al on Tuesday, October 29, 2013 12:14 PM
Short, sweet and to the point.  Thank you!
Comment posted by Nagaraju Pattem on Monday, November 4, 2013 6:51 PM
It's helped to save my time,
Nice post Thanks.
Comment posted by ahmadalli on Tuesday, January 14, 2014 10:44 PM
I used it in a site http://domain.com
now if I go to https://domain.com it'll redirect me to the default IIS 7 page
Comment posted by Al on Thursday, April 17, 2014 11:11 AM
Once again, you saved me tremendous time with this post.  Thanks again!

Post your comment
Name:  
E-mail: (Will not be displayed)
Comment:
Insert Cancel