Bad Request - Invalid Hostname Visual Studio 2015

The format of the bindingInformation attribute is:

ip address:port:host header

What you need is:




There appear to be some folks who are under the mistaken belief that this answer is incorrect. First of all go read the documentation (see link above) and read the examples.

Secondly IIS and IIS Express are essentially the same product. IIS Express has been tweaked so that non-administrators can run IIS on developer PC's where they might not have full local admin rights. Despite this, both IIS and IIS Express use the same applicationHost.config file formats, and this means that the bindingInformation attribute format is exactly the same for both products.

The reason that the (incorrect) :50544: bindingInformation string works is because (rightly or wrongly):

  • if there is no host header specified

  • if there is no matching IP address in the first part of the binding info field

... then IIS will try to match to an IP address in the host header part of the binding info string.

The correct format for both IIS7+ and IIS Express is, and always has been:


You have to run Visual Studio as Administrator

In Visual Studio 2015 the applicationhost.config is located it the folder in the project itself. Esc MyProjectName\.vs\config, note that the .vs folder may be hidden. Change the Ip from there, not IISExpress folder.

Your <binding protocol="http" bindingInformation="*:50544:" /> is correct.