14

I have an error in my code development environment. I can't solve it and I can't work properly rightnow.

Details:
I'm working with "Visual Studio 2015 Update 1", "Windows 8.1 ( with latest updates )". I'm launching one webapi2(resource service) and two asp.net mvc applications(backend and frontend) in Visual Studio Start - debug mode. We are using IIS express not local IIS (inetmgr) because my team mates don't want to run solution in it.

Here is the start action of one project:
enter image description here

The problem is:
When I (start)launch the Visual Studio for debug mode; Visual Studio opens the browser but applications won't work. Sites are stay at loading mode. It's kinda stuck. I mean; Browser is still waiting a response from IISexpress to show, but there is no response there. Here is what I saw (Yükleniyor means Loading...):
enter image description here

If I wait too long, Browser-IIS will give this error: "HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory."

And I see this message in Diagnosic Tools Window: "The thread 0x3714 has exited with code 0 (0x0). The thread 0x2780 has exited with code 0 (0x0). The thread 0x35d0 has exited with code 0 (0x0). etc etc...". There is no error message from Visual Studio. How can I solve this problem ?

Important Note:
If I restart Visual Studio, I can debug the application JUST one time!. If I click the stop and run again, the problem comes back.

Another Note: I tried to contact with Microsoft. I wrote the same problem to them. But 2 weeks pasted, they are not returned back yet.

I tried already:
Working in release mode
Open Visual Studio in Safe Mode.
Restore Visual Studio
Uninstall and reinstall Visual Studio
Uninstall and reinstall IIS Express
Uninstall only VS update 1
Tried in another 2 computers ( Solution and applications are working well. )

Cœur
  • 37,241
  • 25
  • 195
  • 267
Lost_In_Library
  • 3,265
  • 6
  • 38
  • 70
  • Try going to a specific page – stuartd Dec 25 '15 at 12:01
  • Thanks for quick answer. But not working... – Lost_In_Library Dec 25 '15 at 12:03
  • @Lost_In_Library Please state what the error is rather than "But not working." We can only guess that it is something other than 403.14. – Andrew Morton Dec 25 '15 at 13:00
  • @AndrewMorton Ok thanks for feedback. I updated my question as: "Sites are stay at loading mode. It's kinda stuck. I mean; Browser is still waiting a response from IISexpress to show, but there is no response there." – Lost_In_Library Dec 25 '15 at 13:31
  • I think we have same error with this guy. But I explained the question more: http://stackoverflow.com/questions/34220606/visual-studio-2015-asp-net-application-won-t-start-until-restarting-visual-stu – Lost_In_Library Dec 25 '15 at 13:57
  • @Lost_In_Library Have you tried setting a start page in VS? The option should be in solution explorer when you right-click an .aspx file. – Andrew Morton Dec 25 '15 at 15:32
  • What I find strange is that you can only debug once. Maybe you should have a look at the build trace: Tools > Options > Projects and Solutions > Build and Run > MSBuild project build output verbosity setting. This [article](http://ofekshilon.com/2015/08/16/visual-studio-projects-that-just-keep-rebuilding-or-how-quantum-mechanics-mess-up-your-build/) might be of interest. – sjokkogutten Dec 26 '15 at 08:29
  • I have the same problem. A quick workaround is killing IIS Express through "Debug/Terminate All" menu command, directly from Visual Studio. Any news on the issue? – Marco Feb 01 '16 at 09:20
  • To add some more info to this.. I am currently having the same issue. From what I have discovered (using procmon & wireshark) is that IIS Express runs but does not 'attach' to any of the HTTP listeners it creates. In other words, the listener is created as you can TCP connect to it, but it never responds with anything. Any requests to this port receive an ACK but nothing else happens afterwards - it is like the request never makes it to IIS Express. This is not a VS or project issue but an environmental issue. Running IIS Express in elevated privileges also makes no difference. – Michael Coxon Feb 19 '16 at 02:12
  • ... Interestingly, when running IIS Express from the console, with the `/trace:e` switch, when I try and exit it will loop over trying to kill the listeners that have been created. This loops forever and you have to force kill the program. There is nothing in any logs and no IIS logs/traces are created at all. – Michael Coxon Feb 19 '16 at 02:14

11 Answers11

5

In my system the problem seems to be solved. I updates the following items by "Tools/Extensions and Updates ..." menu of Visual Studio 2015:

  1. Microsoft ASP Net Web Framework And Tools (Version 5.2.40204.0).
  2. Microsoft ASP Net Web Tools (Version 14.201.20203.0).
  3. Web Essentials 2015.1 (Version 1.0.207).

I think the problem was solved by update N. 2, but for completeness I reported all items updated.

Marco
  • 961
  • 7
  • 11
  • Did everything on the list - still having the problem. Have to restart IIS every 30 - 40 second. Such a pain – chaZm Apr 29 '16 at 14:36
  • I have also installed Update 2, but I still have problems. The debug system is not stable, sometimes I need kiil IIS Express or IIS. I see very often an error message from the debugger. – Marco Apr 29 '16 at 18:08
3

The issue seems similar to the one I am experiencing in an ASP.NET MVC app. SignalR v2.2.0 was the culprit in my case and the temporary easy fix that worked for me was to replace app.MapSignalR(); in my Startup class with this:

 var task=Task.Run(()=>app.MapSignalR());
 task.Wait(300);
 if (task.IsCanceled)
 {
     Task.Run(() => app.MapSignalR()).Wait(300);
 }

This solution was provided by JonasSyrstad on this SignalR issue thread, along with other useful info: github.com/SignalR/SignalR/issues/3414#issuecomment-75537540

Apparently, the problem is not specific to SignalR. You can find more details in Kaspars Ozols' answer on another thread: https://stackoverflow.com/a/34227866/4491770

Community
  • 1
  • 1
forcodesake
  • 31
  • 1
  • 4
  • I have no idea why this was downvoted, because it was the issue in our case. Thanks a lot for sharing! – Trygve Jun 15 '16 at 08:07
  • I'm glad it helped someone, though I've since solved my issue by using the following approach: http://www.zpqrtbnk.net/posts/appdomains-threads-cultureinfos-and-paracetamol – forcodesake Jun 17 '16 at 09:57
2

I had the same issue, Nb 1 from Marco fixed the problem: install Microsoft ASP Net Web Framework And Tools (Version 5.2.40204.0).

Jepi
  • 21
  • 2
1

Easy workaround until this problem is fixed:

Start command prompt in elevated mode. Execute: taskkill /f /im iisexpress.exe

Jrubzjeknf
  • 69
  • 4
1

Maybe this is already not important but I faced the same issue and tried to solve for 3 days.

Finally, uninstalling and re-installing the IIS Express 10 solved the issue.

  • Solved for me too. Deleted the IIS 10.0 from Control panel - program and components and installed IIS 8.0 from https://www.microsoft.com/en-us/download/details.aspx?id=34679 – chaZm Apr 29 '16 at 14:48
0

I am not allowed to add a comment, as I do not have a rep of 50+ but I did want to chime in and say, I was experiencing this as well from work on Wednesday. I upgraded to VS 2015 Enterprise from VS 2015 Pro. Worked on the same solution/projects I do everyday and boom..

Run project in debug mode and symptoms: the pages stall on load to browser

I set breakpoints in the code -- Controller and in the Razor View to see all the way up until the page is finished on the "server side".

The breakpoints are hit in normal fashion, but the response never seems to make it to the browser.

All I can say, is it seems very similar to Lost_In_Library's issue.

Attempted but persists: /ResetUserData and /ResetSettings

Hope this helps in some way. I'd also like to point out, I have one non default use case, after resetting VS, I have to config for IIS express 64 bit, that is only non default setting I have configured.

Harleyz
  • 121
  • 3
  • 15
  • If I start without debugging (ctrl-f5) everything runs smoothly, but of course, no debugging. I spent a couple hours looking into this issue this morning, I believe the issue is at a low level as part of update 1. – Harleyz Dec 28 '15 at 15:30
0

I faced this problem also. I think it's a BUG of VS2015 or something related.

I found a ugly solution: KILL the sub-process. use Process Explorer from SysInternals Suite 1. Right click the node of iisexpress.exe 2. select "Kill process tree" 3. F5 works.

0

Simply running my Visual Studio (Update 2) in Admin mode solved it for me.

Stephane
  • 11,056
  • 9
  • 41
  • 51
0

Be sure to run Visual Studio as an Administrator. I was having the same issue and that solved being able to Debug with IIS Express.

meany
  • 91
  • 2
0

I've got the same during use MvcSiteMapProvider 4.6.22.

How to repeat:

  1. I used VS 2015 SP3 and created ASP.NET MVC 5 Application.
  2. Then I added via NuGet package manager MvcSiteMapProvider.MVC5 (version 4.6.22). The manager added 4 packages:
    • MvcSiteMapProvider.Web (v4.6.1)
    • WebActivatorEx. (v2.0.1)
    • MvcSiteMapProvider.MVC5.Core (v4.6.22)
    • MvcSiteMapProvider.MVC5 (v4.6.22)

I got "IIS hanging" after start debug of this solution. But next time the solution started fine and IIS hung only after few restarts of debug.

May be you should revise your referenced assemblies in your project?

0

If you experience this issue with Visual Studio 2017, then you may need to ensure that your installation included the selection of the option:

  • ASP.NET MVC 4

make sure you check this

I tried re-targeting my solution to .NET 4.6, 4.5 and 4.5.2 using Web platform Installer without success. This option must include a critical runtime component.

Matt Kocaj
  • 11,278
  • 6
  • 51
  • 79