原文見:http://www.sql-programmers.com/debugging-ssl-website-visualstudio2010.aspx,介紹得非常詳細了
1. Create your Web Site in IIS
a. Open IIS
b. Right click on Web Sites folder
c. Choose “Add Web Site”
d. Enter the details of your Web Site
2. Set up a self-signed certificate in IIS7
a. Open IIS
b. Click on the root machine node in the left pane
c. Double click “Server Certificates” in the middle page
d. Click on Create Self-Signed Certificate
e. Enter a name to use for the certificate and hit “OK”. IIS7 automatically creates a new self-signed certificate and registers it on the machine.
3. Enable HHTPS Bindings for the Web Site
a. Open IIS
b. Click on your Web Site in the left hand pane
c. Click on “Bindings…” in the right hand pane. This will bring up a dialog with a list of binding rules that directs traffic to the Web Site.
d. Add a new binding by clicking “Add”
e. Choose https for Type and choose the SSL certificate you created in the SSL certificate dropdown, then click “OK”
4. Verify the SSL security on website
a. Open IIS
b. Click on the Web Site in the left hand pane
c. Click SSL Settings in the middle pane
d. Verify that Client certificates is set to Ignore
5. Change your Web Site properties
a. Right click on your project name and choose “Property Pages”
b. Change the Start Action to “Start URL:” radio button and fill in the path to your application using https://localhost/...
c. Change the Server setting to “Use customer server” radio button and enter the Base URL of your site http://localhost/...
d. Click “OK”
6. Debug
a. Start debugging your application like you normally would
b. A warning page displays like below
c. Choose “Continue to this website (not recommended).” and you will now be able to debug through your SSL Web Site