Click here to Skip to main content
15,885,244 members
Articles / Web Development / IIS
Tip/Trick

How to Create SSL Secure Server (HTTPS) in Local IIS?

Rate me:
Please Sign up or sign in to vote.
5.00/5 (6 votes)
4 May 2013CPOL2 min read 49.3K   8   2
This tip is helpful to create and manage self-signed SSL certificate for local IIS.

Introduction

This tip is helpful to create and manage self-signed SSL certificate for local IIS. This tip is also helpful to create a secure server in local IIS.

Background

Before you go through this tip, you should have knowledge in IIS.

Steps to Create SelfSSL Certificate

  1. Download and install Internet Information Services (IIS) 6.0 Resource Kit Tools (Don't bother, it will work for IIS 5.0). Click here to download.
  2. Go to Start-> IIS Resources ->SelfSSL -> SelfSSL.exe.
  3. Use the following command to create SSL certificate for Default Web Site in IIS.
  4. SELFSSL [/T] [/N:cn] [/K:key size] [/S:site id] [/P:port]

Note

  • /T -> Adds the self-signed certificate to "Trusted Certificates" list. The local browser will trust the self-signed certificate if this flag is specified.
  • /N:cn -> Specifies the common name of the certificate. The computer name is used if not specified.
  • /K:key size -> Specifies the key length. Default is 1024.
  • /V:validity days -> Specifies the validity of the certificate. Default is 7 days.
  • /S:site id -> Specifies the id of the site. Default is 1 (Default Site).
  • /P:port -> Specifies the SSL port. Default is 443.
  • /Q -> Quiet mode. You will not be prompted when SSL settings are overwritten.
  • E.g. -> SELFSSL /T /N:localhost /K:1024 /S:1 /P:443 /V:365 (for 1 year)

Steps To Remove a SelfSSL Certificate

  1. Open IIS 5.1.
  2. Right click on Default Web Site and Select Properties.
  3. Then click on Directory Security tab.
  4. Click on Server Certificate button and follow as shown in the following images:
  5. Image 1

  6. Image 2

  7. Image 3

  8. Click Yes on Confirmation Dialogue (if any).
  9. Image 4

Steps To Assign an Existing SSL Certificate

  1. Open IIS 5.1.
  2. Right click on Default Web Site and Select Properties.
  3. Then click on Directory Security tab.
  4. Click on Server Certificate button and follow as shown in the following images:
  5. Image 5

  6. Image 6

  7. Image 7

  8. Image 8

  9. Image 9

Conclusion

I think this tip will be very helpful for software developers. Thank you.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
India India

Comments and Discussions

 
QuestionTrusted Certificates Pin
dietkart29-Jan-14 19:13
dietkart29-Jan-14 19:13 
QuestionNot an article Pin
OriginalGriff3-May-13 4:39
mveOriginalGriff3-May-13 4:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.