Visual Studio open support SSL

Visual Studio open support SSL

premise:

Make sure you have installed the IIS Express

To do:

1, web project -> [Right] -> [] conversion project using IIS Express Web server.

2, click the web project, press [ctrl] + [w], then [p], appears the list of attributes. as follows:

3, select the above has started [SSL], [True] can be changed.

At this point, you will find the above properties more of a page address, as follows:

4, open the [C: \ Users \ your user name \ Documents \ IISExpress \ config \ applicationhost.config], amended as follows:

I suppose the above project called: WebApplication3, then the direct search for the project name. Because the configuration file is directly corresponding to the name of the project.

You can see, it has joined the port 44300 https, and http compared with 65068. Here is the automatic assumption that you check the above option, but did not rule out some of the reasons to join, you can manually add their own.

You can now access the test to see whether the effect.

 

Successful visit.

Test the code below:

code show as below:

Response.Write("SLL:" + HttpContext.Current.Request.IsSecureConnection);

premise:

Make sure you have installed the IIS Express

To do:

1, web project -> [Right] -> [] conversion project using IIS Express Web server.

2, click the web project, press [ctrl] + [w], then [p], appears the list of attributes. as follows:

3, select the above has started [SSL], [True] can be changed.

At this point, you will find the above properties more of a page address, as follows:

4, open the [C: \ Users \ your user name \ Documents \ IISExpress \ config \ applicationhost.config], amended as follows:

I suppose the above project called: WebApplication3, then the direct search for the project name. Because the configuration file is directly corresponding to the name of the project.

You can see, it has joined the port 44300 https, and http compared with 65068. Here is the automatic assumption that you check the above option, but did not rule out some of the reasons to join, you can manually add their own.

You can now access the test to see whether the effect.

 

Successful visit.

Test the code below:

code show as below:

Response.Write("SLL:" + HttpContext.Current.Request.IsSecureConnection);

Guess you like

Origin www.cnblogs.com/imPedro/p/11297577.html
Recommended