1

I'm facing an issue here.

For Facebook debugging reasons, I made a host entry in my hosts file which looks like this:

127.0.0.1 local.fablelane.com

The error

Now, when I try to load the IIS Express server, I get an error 400 (Bad Request), which looks like this in Chrome.

Chrome error

Settings

My Visual Studio 11 settings are as follows.

Visual Studio settings

Edit 1

It should be noted that when I enter "localhost:2000" in the browser, it works just fine.

Edit 2

If I change the project URL to "http://local.fablelane.com:2000/", the following error-message pops up. I am running Visual Studio 11 as an administrator by the way.

enter image description here

Mathias Lykkegaard Lorenzen
  • 15,031
  • 23
  • 100
  • 187

2 Answers2

2

The reason it is not working is that your site listens on the IP 127.0.0.1, but only for hostname 'localhost'.

You can set your 'Project Url' to 'http://local.fablelane.com:2000'. Also, I see no reason for 'Override application root URL' to be checked.

Or you could host in IIS instead of IIS Express and bind several hostnames for this site (so both localhost and local.fablelane.com would work). You can find more information about that here.

efdee
  • 2,255
  • 3
  • 20
  • 26
  • When I try to change the project URL I get this error: http://i.imgur.com/kTpld.png – Mathias Lykkegaard Lorenzen Mar 30 '12 at 09:23
  • 1
    I'm guessing it's because the port is already in use, since you added localhost:2000 earlier. IIS Express is a bit backwards like that. Try changing the port number, or, if that's not an option, remove the previous site binding. The accepted answer on [this question](http://stackoverflow.com/questions/5608976/iis-express-unable-to-create-the-virtual-directory) should help you. – efdee Mar 30 '12 at 16:30
0

Ok, use iss manager to publish your website locally. In the binding section add binding like you posted earlier local.fablelane.com. Don't forget to check it in hosts file. That should work.

Johnny_D
  • 4,592
  • 3
  • 33
  • 63