Matze
Matze

Reputation: 5508

Cannot run web application on Windows 10 using IIS Express

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.

Upvotes: 24

Views: 29605

Answers (6)

Hiran
Hiran

Reputation: 1180

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.

Upvotes: 0

Alan Stark
Alan Stark

Reputation: 103

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

Upvotes: 8

Julien
Julien

Reputation: 427

I got the same issue as DJH2006X.

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

Upvotes: 1

Bron Davies
Bron Davies

Reputation: 6004

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

Upvotes: 4

Leonardo
Leonardo

Reputation: 11401

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

Upvotes: 0

DJH2006X
DJH2006X

Reputation: 133

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

Upvotes: 12

Related Questions