24
votes

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.

6
No, it's the issue with the Edge. You have solution here: stackoverflow.com/questions/30334289/…freshbm
Not sure... the localhost loopback is already enabled (needed that for development of a UWA as well).Matze
@freshbm The suggested solution does not work; the problem remains...Matze
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
@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

6 Answers

12
votes

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).

8
votes

(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.

4
votes

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

1
votes

I got the same issue as DJH2006X.

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

0
votes

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...)

0
votes

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.