Net Core IIS Express in

Source: Internet
Author: User

IIS Express is a mini version of IIS that is capable of supporting all web development tasks, but there are flaws in this design, such as the ability to access our applications only through localhost:<port>, which looks a bit uncomfortable, Fortunately we can change the default configuration and use a custom hostname to access the site program running on IIS Express.

1. Create a new ASP. NET Core Web application

If you do not make any changes, the first run will be run using the Localhost:<port> method, The Config folder is created under the. vs folder, and a applicationhost.config is generated under the Config folder, which is the startup configuration file for IIS Express. The Note:.vs folder is hidden by default and you need to display it.

2. Right-click on the item → properties, select debug Options, modify the app URL

can also be modified directly in the Launchsettings.json file

After the modification is complete, we return to the IIS Express startup profile ApplicationHost.config, and we find that a binding node is automatically more

3, modify the Hosts file, located in C:\Windows\System32\drivers\etc\hosts, open it as an administrator, and add the following content

127.0.0.1 Www.oneaspnet.dev

Run the program again

For legacy ASP. NET Projects

It is strange that after saving the add binding node is not added automatically in the IIS Express configuration file, we need to add it manually.

Whether a new generation of ASP. NET Core or traditional ASP. NET can be accessed in the custom domain name in IIS Express, does it look sour?

Net Core IIS Express in

Related Article

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.