Visual Studio 2012 IIS Express 8 Fresh Install - Can't Connect

前提是你 提交于 2019-11-30 17:58:46

I tracked down the problem on my machine.

When I checked my C:\Windows\system32\drivers\etc\hosts file, I did not have

 127.0.0.1   localhost

in the file. I remember changing it "temporarily" to troubleshoot a problem. Adding back in the missing record fixed my problem.

You can test what IP your machine thinks localhost is by simply ping localhost and making sure that 127.0.0.1 is pinged and not some other IP.

Did you check if the http bindings registration happened for your site? (running "netsh http show servicestate" command from command prompt would show all the registered bindings and check if your site binding "localhost:60046" exists or not)

if your site binding does not exists, try following to check why bindings registration is failing.

  1. Open command prompt
  2. Goto IIS Express installation folder (%programfiles%\iis express)
  3. Start your site from command line by using following command line iisexpress.exe /site:"your-site-name" /trace:d
  4. Step 3 would show error message if the bindings registration fails

I had a similar issue running my asp.net MVC4 project on localhost under IIS express 8.0 so I ended up uninstalling IIS 8.0 and installing IIS express 7.5 and straight away the problem was fixed:

IIS Express 8.0 seems to be installed with VS 2012 so if you had a new install or possibly a service pack update this might have upgraded your previous IIS express version.

Dylan

I resolved my issues with IIS by installing WebMatrix (download). I ran WebMatrix, opened a site in WebMatrix and IIS fired up just fine. Closed WebMatrix and ran an ASP.NET MVC site in VS and it worked.

brudert

I know this question was answered by the original poster, but for those who get here through google, here is a possible solution to your problems: HTTPS stopped working with IIS express

If anyone else has this issue - make sure any website bindings in applicationhost.config refer to valid addresses.

I had this message when applicationhost.config was binding to a specific IP address, but that IP wasn’t valid for the host at that time (I had an internal network IP assigned via a DHCP reservation, but I was on a different network).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!