I get the Bad Request- Invalid Hostname [HTTP ERROR 400] while trying connect my laptop\'s localhost. Actually, I am learning to develop mobile web using jQ
Add Bindings of IIS Manager
Add Bindings of IIS Express (Visual Studio)
C:\Projects\<ProjectName>\.vs\config\applicationhost.config
.C:\Users\<your profile name>\Documents\IISExpress\config\applicationhost.config
In applicationhost.config
, search by the port number (for my case is 57976), then one more binding with your IP Address
<site name="Web(1)" id="9">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\abc\project\dev\web" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:57976:localhost" />
<binding protocol="http" bindingInformation="*:57976:192.XXX.X.XXX" />
</bindings>
</site>
For windows 10 or Visual Studio 2015 users, you may get the error message below:
Unable to launch the IIS Express Web server, Failed to register URL, Access is denied
Solution:
Reference: https://azure.microsoft.com/en-us/documentation/articles/mobile-services-dotnet-backend-how-to-configure-iis-express/
Clear Browser data ctrl+shift+del