24

I am developing a web application using ASP.NET MVC (a rather simple application, having just a single controller and a few routes; there´s nothing fancy in it). In the beginning I used Visual Studio 2013 and Windows 8/8.1. A couple of days ago I switched to Windows 10 and I am having trouble to run the application on my local development machine (I have both Visual Studio 2013 and 2015 installed, but I continue using Visual Studio 2013 for this project).

When I start a new instance for debugging, IIS Express starts, Visual Studio launches the selected browser (which is Edge by default), but the request to the site never returns a valid response.

I can see in the system tray, that the application seems to be running fine. I also checked with Fiddler; and Fiddler shows me that the browser´s request never gets a response from the local server. Can this be an issue with the firewall?

Update

I think it has nothing to do with the Edge-browser nor with the localhost loopback setting (this setting has been enabled via about:flags page). Furthermore, I experience this problem under the final version of Windows 10.

Bron Davies
  • 5,930
  • 3
  • 30
  • 41
Matze
  • 5,100
  • 6
  • 46
  • 69
  • No, it's the issue with the Edge. You have solution here: http://stackoverflow.com/questions/30334289/cant-open-localhost-in-microsoft-edge-project-spartan-in-windows-10-preview – freshbm Aug 12 '15 at 08:21
  • Not sure... the `localhost loopback` is already enabled (needed that for development of a UWA as well). – Matze Aug 12 '15 at 08:59
  • @freshbm The suggested solution does not work; the problem remains... – Matze Aug 12 '15 at 09:26
  • Did you try debugging? Are your action methods called? Do they return anything? What do you mean "never gets a response"? Do you get a timeout error? Are any exceptions thrown on the server side? – Panagiotis Kanavos Aug 12 '15 at 11:13
  • @PanagiotisKanavos Yes I tried debugging; it´s really strange. I just put a breakpoint into the `Application_Start` method in my `HttpApplication` class (global.asax); the breakpoint is never hit... I think something is going wrong with IIS Express. – Matze Aug 12 '15 at 12:57
  • If I switch the server (via the project properties) from `IIS Express` to `Local IIS` everything works as expected... – Matze Aug 12 '15 at 13:30
  • I have new Win10 VS2015 PC, IIS Express 10, fully updated. Pages loads fine, large table, then after maybe 10 secs, "localhost is not responding" Recover Web page button. Page actually reloads on it own, sometimes. Nothing is running after the initial query. Page runs perfect on demo server and production server using IIS 8.5. IIS Express 10 is bad IMHO. All 3 systems have 16GB of RAM ea. – htm11h Dec 20 '16 at 21:31
  • Another thing to try is your VPN. When connected to my (slow) VPN, IE and Edge fail but Chrome works. If I disconnect, all 3 begin working. – Brad Irby Jun 25 '19 at 07:07

6 Answers6

12

I got it working for me, uninstall IIS Express 10.0 from 'Programs and Features' and install IIS Express 8.0. I have no idea what caused the issue in v10.0 as it works on some of my office machines and not on others (all Windows 10 x64).

DJH2006X
  • 133
  • 5
  • 1
    This is a good work around - I would love to see the issue solved using iis express 10 though. Thanks for the answer. – Behr Jan 26 '16 at 14:43
  • 1
    The strange thing is that Windows 10 / VS2015 / IIS Express 10 works fine on a Hyper V VM I use for development. It does NOT work on the host computer itself (Windows 10 as well, but it was 8.1 and still had this issue). IIS Express 8 seems to work. Full IIS was also working. Strange, thanks for the workaround!! – Aardvark Feb 18 '16 at 15:12
  • Thanks for this useful answer, I must admit, I tried it half-heartedly but it worked. – Habib May 27 '16 at 14:16
8

(To moderators: please take the time to actually read my answer. It is not a 'thank you' post. It expands a hint that didn't work 'as-is' into a full solution)

Solved it. First I tried:

  • Reinstalling IIS Express 10
  • Installing IIS Express 8
  • Deleting applicationhost.config

Nothing helped. I started IIS Express 10 via the command line and it worked fine. But Visual studio wouldn't launch my project.

Then I realized that my project settings survived several Windows reinstalls and migration from Windows 8 to Windows 10. So I deleted the entire .vs solution folder. Voila! The ASP.NET MVC web application is running in IIS Express 10.

Credits go to @Bron Davies for mentioning the .vs folder. Going down this path led me to a full solution.

Alan Stark
  • 103
  • 1
  • 8
4

Try deleting your applicationhost.config file in %USERPROFILE%\Documents\IISExpress\config - this file can be problematic after an upgrade from Windows 7/8. When you start your project again, it will be recreated.

How can I create new applicationhost.config file in IIS Express Server?

Also, make sure you are using IIS Express 8 for VS 2013. VS 2015 uses IIS Express 10 which has a different config file location per solution located in .vs\config\

Just as an aside, I highly recommend updating to VS 2015 if developing on Windows 10. The projects are still backward compatible if you have to switch back or collaborate with someone using 2013

Community
  • 1
  • 1
Bron Davies
  • 5,930
  • 3
  • 30
  • 41
  • I also experience the same problem with IIS Express 10 in conjunction with Visual Studio 2015. – Matze Jan 31 '16 at 18:01
  • @Matze check in the Programs and Features control panel, make sure IIS Express 8 is not installed. Then reset your visual studio settings using this: `devenv.exe /ResetSettings`. After that select Web Development for your default settings. – Bron Davies Feb 01 '16 at 21:24
1

I got the same issue as DJH2006X.

I had to install IIS Express 8 instead of 10 and it works fine.

Julien
  • 411
  • 4
  • 13
0

I just solved this problem... for some reason, win 10 was detecting my network connection as public... after setting it to private, and restarting IIS express everything worked fine... no need to run scripts or anything... (FYI, I had disabled win firewall ages ago...)

Leonardo
  • 10,737
  • 10
  • 62
  • 155
  • 1
    Disabling the firewall is not an option; network connection is already set to private... but I will give it a try and set it to public and than back to private... – Matze Sep 09 '15 at 07:42
  • @Matze you can just open the required ports/addresses on firewall... i recommend turning it all off just to test if that is the actual problem, than turn it back on – Leonardo Sep 09 '15 at 13:24
0

First thing is to delete applicationhost.config from the project folder ( as described above) and restart the visual studio. this will work for most of the scenarios.

Hiran
  • 1,102
  • 11
  • 18