Today's new site found in the Chrome browser, through localhost access is valid, but through the native IP even 127.0.0.1 access is not valid,
The error in the report is that the Request Invalid HostName
So that the site through two computers access, debugging encountered a small resistance
Here's how to fix it:
1. In the status bar, select the Iispress site, right-click to display all applications
2. Click the site name, select the configuration path in the path indicated below, open the ApplicationHost.config file
3. In the open file, locate the current site in the Binding configuration section, add the following red box configuration
4. There is no 400 situation when accessing the ip+ port in the browser.
Other information:
Visual 2012 and the lower version is the configuration of the ApplicationHost.config file that modifies the document directory
Reference URL: http://stackoverflow.com/questions/28699538/ bad-request-invalid-hostname-with-asp-net-webapi-project-in-visual-studio-2013
VS. LocalHost access effectively use IP Access 400 error Invalid hostname Modify method