Friday, February 24, 2012

How to setup SSL in local machine for testing-IIS7/Windows7

How to setup SSL in local machine for testing-IIS7/Windows7
Yes I know it’s a pain setting up SSL in local machine for testing. General procedure of implementing SSL is,

1. Generate a certificate request
2. Send the request to a Certificate Authority
3. Wait until the certificate is returned to you
4. Install the certificate and finally
5. you need to add a SSL binding in IIS

When development it is not practical of getting certificate purchased from certificate authority and wasting money, but earlier time IIS did not have such facility for use, but now IIS have facility called “Self-signed certificates”.
So IIS has made it much easier by allowing you to create a self-signed certificate and use this certificate for your SSL sit. Because of the you can ignore 1,2,3 steps.(wasting time and money).
SO by using that you can quickly create personal certificate and Enable SSL site for development or testing purposes.

Setting up SSL enables Site LocalHost

1. Create a Self-signed certificates
2. Add a SSL binding in IIS-Your Site

Create a Self-signed certificates
Go to IIS ->ROOT IIS server->Right side of the section D- click “Server Certificate”

In the Action menu click Create-Self signed Certificate it open a pop up in there give a name to your certificate. Then you r done with creating your certificate.

Add a SSL binding in IIS-Your Site
To SSL enable the web-site we created earlier, select the web-site node in the left-hand tree-view, and the click the "Bindings" link in its "actions" pane on the right-hand side of the screen:

Add a binding set screen as below set OK.

So you are now done with your certificate binding.
If you are using IE7, you'll likely see this anti-phishing error message like this

Don't confuse if this happens - it is just IE being helpful by suggesting that a self-signed certificate on your local machine looks suspicious. Click the "Continue to this website" link to bypass this security warning and proceed to the site.  You'll find that your site is now running protected via SSL

You are gritting some Error in address bar saying 

You can solve the issue and get the padlock: follow steps

  • With Mozilla Firefox, add an exception to add the certificate into the list of trusted certificates
  • With Internet Explorer, open the Advanced Internet Options and uncheck the security setting 'Warn about certificate address mismatch'.

Note: If you are using skype make sure to log off from it. 

No comments:

Post a Comment