IIS express magic Hall: Unlock the localhost Domain Name

Source: Internet
Author: User

I. Preface

Single Sign-on is to obtain the logon information from the cookie through the domain name, and then obtain the user information based on the cookie key-value pair. However, because localhost is used as the domain name by default during application debugging through IIS express and cannot be directly modified, the cookie information cannot be obtained. The previous practice was to directly deploy the web application on IIS, and then debug it through the "APPEND process" in vs. This is too much trouble and it is inconvenient for the team to build a development environment.

Today, I spent some time reading the relevant information, so I don't have to worry about it anymore. Now record it for future reference.

 

2. Set the project to use IIS Express

Right-click a web project and choose Properties.

 

3. Configure HTTP. sys to unlock the localhost Domain Name

Run the command in cmd of win7.

Netsh HTTP add urlacl url = http: // new domain name: 8017 user = everyone

 

4. Modify the IIS express applicationhost. xml configuration file

In the configuration file "My Documents"-> "iisexpress", change the <binding> label corresponding to the <site> label under the <system. applicationhost> label

<Bindings> <binding protocol = "HTTP" bindinginformation = ": 8017: new domain name"/> </bindings>

Then add the local DNS in the % WINDIR % \ system32 \ drivers \ etc \ hosts file.

 

V. Summary

The above content only solves the actual problem and does not provide a thorough solution. In the future, I will add some knowledge about IIS Express.

Respect Original, reprinted please indicate from: http://www.cnblogs.com/fsjohnhuang/p/4043894.html ^_^ fat Zi John

 

Vi. References

Http://www.cnblogs.com/nicch/archive/2011/03/20/how_to_use_iis_express.html

Http://www.iis.net/learn/extensions/using-iis-express/handling-url-binding-failures-in-iis-express

IIS express magic Hall: Unlock the localhost Domain Name

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.