Visual Studio 2015 Update 1 - No IIS Express Response While Debugging - windows

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

In my system the problem seems to be solved. I updates the following items by "Tools/Extensions and Updates ..." menu of Visual Studio 2015:
Microsoft ASP Net Web Framework And Tools (Version 5.2.40204.0).
Microsoft ASP Net Web Tools (Version 14.201.20203.0).
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.

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

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

Easy workaround until this problem is fixed:
Start command prompt in elevated mode.
Execute: taskkill /f /im iisexpress.exe

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.

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.

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.

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

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.

I've got the same during use MvcSiteMapProvider 4.6.22.
How to repeat:
I used VS 2015 SP3 and created ASP.NET MVC 5 Application.
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?

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

Related

Visual Studio Debugging is stuck at "Attaching to the web server"

When I run my Web API application I get the following window:
It just stays like that indefinantly, until I hit cancel.
When I do hit cancel, this error message is shown:
I have tried rebooting, and running iisreset /restart but it does not fix it.
Any ideas what I can do to get my debugger working again?
NOTE: My Web API 2 project's Servers setting is set to Local IIS. My service is hosted by IIS and when I am not debugging, it works fine.
A possible fix:
Check the "Enable Just My Code" in Tools->Options->Debug
I just did a reset for all the settings for VS and it worked again.
Tools => Import and Export Settings => Reset All Settings
good luck!
I had this issue for Visual Studio 2017 and like with the previous post I had Debugging option "Enable .NET Framework source stepping" ticked. Un-ticking fixed the issue.
So as I commented before I had this same issue, but I now figured out the cause and have a solution.
I just got a new machine last week (this issue was actually one of the reasons why) and after a while I had the same issues, not being able to debug my projects. Luckily because I was installing all the updates one by one I was able to pin-point when it started happening.
It seems the latest update for the "Microsoft ASP.NET and Web Tools" extension breaks something.
Sadly, uninstalling or reverting the Web Tools extension is not easy: Remove this extension by going to the Windows control panel and modifying your Visual Studio installation. I had to remove Visual Studio completely and reinstall it (repair didn't do the trick).
You can update and install all your extensions as you wish, just make sure that you don't update the Web Tools extension
I tested this on my old machine and it did the trick there as well.
I've also created an Issue on GitHub as I won't be updating the extension until this is fixed, if anybody has additional information please add it to the Issue.
In Visual Studio 2015, go to Tools -> Options -> Debugging and deselect "Enable .NET Framework source stepping". This may relate to an issue with loading symbols, so if you want to keep the ability to debug .NET Framework source, then it may help to search the web for how to clear the symbol cache, or preload it, or set your symbol server, and so on.
In Visual Studio 2017, I just restarted my machine and ran the solution, no other windows opened not even a browser, although visual studio took a long time to open (30+ projects in a solution) the problem did not reoccur.
I had the same issue in VS 2017 and un-checking 'Native code' did the trick. Not sure why it was checked.
In my case I set Debugging ->Symbols -> To "Load Only Specified Modules" to include the symbols for, in my case a devops symbols feed for some internal NuGet packages
Options>Debugging>Symbols>Load Only Specified Modules
By checking the option "Always load symbols where located next to modules" the setting won't mess with the regular/classic debugging in VS for your own code
This way the Symbols are still loading where needed and Visual Studio is not trying to load debugging information for all the IIS .net dlls that were loaded by w3wp
Alternatively it can also be configured to not load symbols for microsoft.*.dll and it will also work.
Didn't see this in the current answers, so thought I'd give my 2 cents in 2022:
What worked for me:
Make sure to check that your IIS application pool hasn't been stopped (and restart it if it is), and then if that's not the case, restart your IIS server.
If you don't where those settings are, open our Internet Information Services (IIS) Manager, Application Pools are in the left-hand column, and restart/start/stop your server is in the right column.

the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container

I recently installed Visual Studio 2013 Ultimate version on my machine. I'm just trying to create a sample windows form project and trying to open the designer / form by double clicking on Form1.cs and I'm getting this weird error message:
"the service microsoft.visualstudio.shell.interop.iselectioncontainer already exists in the service container"
My system is already having Visual Studio 2010 which is working smoothly from a long time. I then installed Visual Studio 2012 which was giving the same problem as above. So I went ahead with installing VS 2013 hoping that I might be able to get rid of this issue, but no use.
Once I click OK on the error windows, I can see the following "message" in the bottom Error List window:
"The file 'C:\Users\ABCD\Documents\Visual Studio 2013\Projects\WebSite1\WindowsFormsApplication1\Form1.cs' does not support code parsing or generation because it is not contained within a project that supports code."
I have spent 2-3 days searching various blogs like these, all of which talk about previous version of Visual Studio like VS 2005 / VS 2008:
https://connect.microsoft.com/VisualStudio/feedback/details/311949/the-service-microsoft-visualstudio-shell-interop-iselectioncontainer-already-exists-in-the-service-container
Form inheritance in Visual Studio 2008 doesn't work
I have even tried uninstalling and reinstalling VS 2013, again no use.
It would be really great if someone can help me out in fixing this.
I've just had the exact same error message.
After compiling the solution(F6 or Build->Build Solution) it worked fine for me.
To deal with your issue, please first make sure that you installed latest updates on your Windows 8 machine, and then repair VS2013.
During your repairing process, please temporally turn off your anti-virus/antispyware software and repair VS2013 with the Administrator privilege.
follow this link
The problem got resolved finally, after so many days and various frustrating tries to resolve the issue. I should thank Tim Atkins from Microsoft for helping me with resolving this issue.
Fix: When we tried 'gacutil /l system.design', we found that there were 3 variants of system.design; One from .Net 2.0 targetting MSIL, second from .Net 4.0 targetting x86 and last one also from .Net 4.0, but targetting MSIL.
On a working machine, there were only 2 entries, the .Net 4.0 one targetting x86 wasn't there. Hence we uninstalled this version using gacutil which did the magic. I was so relieved seeing the win forms popping up without any errors anymore :)
I changed the target framework from 4.5 to 4.6.1 and it fixed it for me. My assumption is sometimes when you change target framework back and forth and the process does not go through all the way (cancelling in the middle of changing it) - something happens that leads to this error. Hope that helps
I solved this be closing VS, deleting contents of the .vs folder where my solution is, restarting VS and recompiling.
Seems like one of those file/settings/caching problems that pop up now and then, might be after switching source branch.
VS2019, .net fw 4.6.2.
If your C drive (Where you are installing Visual Studio) does not have enough space, try moving some files from the C drive to another drives.

Visual Studio crash at start-up

My Visual Studio began crashing at start-up. In my search for finding a remedy, I found these two suggestions, but neither worked for me:
Launching Visual Studio while running in safe mode, and
Running repair on Visual Studio.
However, I found that if I logged into a different Windows account, Visual Studio was able to run from that account without crashing.
Here is an error code that that I observed in the crash report:
LCID: 1033
Can anyone provide a solution for returning my Visual Studio to working order?
For me it turned out to be the plugin that GitExtensions installed into Visual Studio 2013.
-- UPDATE: try this before uninstalling GitExtensions
#Enceradeira proposed in the comments to uncheck the Show current branch in Visual Studio option. In GitExtensions, you get there via Tools -> Settings -> Appearance:
-- END OF UPDATE
After uninstalling GitExtensions and reinstalling it with all VS plugin unselected my VS runs smoothly again.
I even put together a blog post about this issue because it bugged me so much.
Since you're able to run with another user login, something may be wrong with your local settings, you can try to reset them: devenv /resetsettings in Start menu -> Run.
Warning: this will restore visual studio to default settings.
In my case VS used to crash on a single solution. I resolved the problem by deleting the respective solutions's user file: SolutionName.suo
My colleague recently experienced a problem with Visual Studio 2013 crashing on start-up. Unfortunately, we found that the approach recommended in the answer by #Arun M did not solve the problem:
devenv.exe /ResetSettings
...however, using a different command line argument did:
devenv.exe /ResetUserData
An easy way to run devenv.exe is via the Visual Studio command prompt; on Windows 10, it can be found here:
Start Button => All Apps => Visual Studio 2013 => Visual Studio Tools =>
VS2013 x86 Native Tools Command Prompt
For more about these command line arguments for devenv.exe, see this answer to this related question: How do I truly reset every setting in Visual Studio 2012?. ⚠ In particular, please note the cautionary statement in that answer about the /ResetUserData command line argument!
Try to run VS as administrator. That's necessary in my case.
If coincident to these Visual Studio crashes you are getting "Heap corruption" (Exception code: 0xc0000005) errors in your Windows Application log (Faulting module name: WindowsCodecs.dll), here is something worth checking into: A faulty WIC component within Expression Blend can cause ALL versions of Visual Studio to crash upon launch, as well as cause Internet Explorer to crash upon visiting many, if not most sites. Even though Microsoft distributes this component, they call it a "non-Microsoft component". As such, a Visual Studio reinstall won't fix this,, an OS reinstall over existing Windows installation won't fix this, and a system file integrity check won't detect it.
If my case, the misbehaving codec was "C:\Program Files (x86)\Microsoft Expression\Common\Imaging\4.0.360.0\PSDCodec.dll", and simply unregistering this component got my Visual Studio working again from consistent startup launch crashes.
I post this in hopes this solution to one source of Visual Studio crashing might save others from the $500 Microsoft support incident fee and week of downtime this caused me.
I just changed the windows language in the bottom right to "EN", then started as admin. And it worked, interesting..
I had the very strange phenomenon that both Visual Studio 2010 and 2013 on a Windows 7 machine crashed when run in a remote desktop session, started from a Windows 10 pc. Debugging the crash showed a CultureNotFound exception. It was caused by regional settings on the Windows 10 pc, which could not be translated in something understood by Windows 7. I had language English(Belgium) with an Azerty keyboard. I added and selected English(UK) with an Azerty keyboard and the crashes disappeared. No other programs suffered from this.
For me it was being caused by Web Essentials and I was able to resolve by disabling it, restarting VS, enabling it back , restart again. Works now.
I had a crash on startup (or soon after startup, before opening any solution) occurring in git2-msvstfs.dll, caused by placing a 3GB temp file into a directory within my solution. Deleting the file fixed it.
Once I accidentally pressed a random key combination (maybe something like ctrl+', but I didn’t realize I was holding ctrl down so I forgot what keys I hit by the time I realized something bad had happened) that resulted in VS Professional 2017 15.3.5 crashing within half a minute. After relaunching, I found that VS would be interactive for a few seconds before it would crash within half a minute. It was really too fast for me to try to figure out what I had accidentally activated or for me to disable it before VS would crash. Also, it would even crash if I didn’t open any solution, so I figured it was not something that deleting a .vs (per project/solution Solution Explorer/open files state) folder would fix.
To fix, I followed Arun M’s comment and renamed my %LOCALAPPDATA%\Microsoft\VisualStudio\15.0_3f4d04be folder. You will need to adjust the path for the edition/version of VS that is crashing. On my machine, I think 15.0_3f4d04be is Professional and 15.0_0fed6c59 is VS Community Edition. You’ll probably have to guess based on the folder’s modification timestamp which is probably going to reflect the date you last used that edition of VS.
After renaming the versioned dotfolder, VS launched without crashing. It started with default settings but automatically restored some of my settings through the cloud sync stuff after a minute of running and it even remembered my account information so I didn’t need to sign in.
I did not need to rename my %LOCALAPPDATA%\Microsoft\VSCommon folder (which Arun M had also suggested).
I had a similar problem, both VS2015 and VS2013 would crash at startup. Tracked it down to an application I installed which put .net 4.7.2 on the system. Once i removed that app, removed .net, and reinstalled .net 4.6, Visual Studio started working again.

Visual Studio 2010 crashes repeatedly

I've been running Visual Studio 2010 (the official release) for some time now. Lately, VS will crash 10+ times during my 8 hour work day. In VS2008, crashes were common when working with large Xaml files, and while I experience some of that with VS2010, crashes occur when debugging, starting the debugger, stopping the debugger, and other random times when editing code.
I've looked through the problem reports, and the one I've found that occurs most frequently is:
Description
Faulting Application Path: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe
Problem signature
Problem Event Name: APPCRASH
Application Name: devenv.exe
Application Version: 10.0.30319.1
Application Timestamp: 4ba1fab3
Fault Module Name: ntdll.dll
Fault Module Version: 6.1.7600.16385
Fault Module Timestamp: 4a5bdb3b
Exception Code: c0000005
Exception Offset: 0002e23e
I'm running Windows 7 (x64). Hoepfully someone has come across this problem and has found a solution. I plan on reinstalling VS2010. Hopefully that takes care of the problem.
Do you think you have installed any extra Extensions which might lead to frequent crashes?
You can try
Devenv.exe /SafeMode
to start in Safe mode. You can also try
Devenv.exe /Log
Which will log all activity. Have not tried this so don't know What activities are logged.
Visual Studio 2010 Command Line Switches
I was having a similar problem and this helped me
http://connect.microsoft.com/VisualStudio/feedback/details/618802/visual-studio-random-frequent-crash
Running this from the command prompt seemed to fix it. It hasn't crashed for the whole day today.
regsvr32 c:\Windows\System32\ole32.dll
I had similar issues with Visual Studio. The problem was the service pack which for some reason was not installed properly.
I had to reapply the SP1 using the Repair / reapply option. This kind of fixed my issue.
Also make sure to reboot the system.
Just to help people who search it: It was webex instant messenger related part, but not Cisco itself. The cause was a component in Studio Power Tools relevant to integration with messenger. Reinstall power tools but without messaging integration.
In other occasion it is almost always a corporate antivirus authentication helper thing. It required to manually remove registry entries which cause background TFS logins break the studio at random moments.
I had the "Microsoft Visual Studio 2010 has stopped working" error, imediately when Visual Studio 2010 was starting. Fault module was clr.dll in my case. Only rebooting helped sometimes.
I solved it by removing .NET completely and reinstalling it.
Be aware that if you updated to .NET 4.5 this includes .NET 4, so you have to remove and reinstall .NET 4.5
I know why it could be crashing. Code it self. Have you tried to debug the failed instance of VS2010 with Vs2010? If the xaml designer crashed anywhere in your code you should be able to see the stack trace. Also, try to load the same xaml into Blend 4 and then run the vs2010 on Blend when that crashes. I've had some good results debugging Vs2010 crashes like that.
There are so many things that can cause studio to crash.
I'd look at everything from video card drivers to whether the RAM is stable.
Note, there is a microsoft connect but on this exact issue at: http://connect.microsoft.com/VisualStudio/feedback/details/634162/devenv-exe-frequent-intermittent-crashes-fault-module-name-ntdll-dll
You might vote on it or add your own information to the report but the very first thing I'd do is update my video drivers. One place I was at had a lot of issues with 2005; it would randomly crash just displaying the design surface or when opening a few too many code files; but once we got decent video cards and the appropriate drivers installed it worked flawlessly.
I disabled “Options"-"Evnironment"-"Add-in/Micros Security"->"Allow macros to run", and fixed the problem.
I think I just solved a similar issue on my computer, but probably not the same cause. It was related to TortoiseSVN (I think visual loads the tortoise DLL because it is integrated with the explorer, even if I don't have a specific visual studio plug-in). I upgraded TortoiseSVN (from 1.7.8 to 1.7.11) and it didn't crash for a few hours (I also had a 100% repro case when closing visual studio which does not happen anymore). Maybe there is some way to check what DLLs are loaded by visual studio to troubleshoot what are the candidates for upgrading/uninstalling, but I didn't go this far.
Hope it can help someone else.
While developing C++ code, Visual Studio 2010 started crashing frequently and at random times after I enabled the Task List.
As an alternative to using the Task List, I am now simply using the Find in Files tool (Ctrl+Shift+F) and searching for the string TODO as an alternative.
i was having a similar problem. visual studio 2010 was crashing. when i attached, it said it had a read access violation in ntdll.dll
closed all my open instances (there were 5) and it stopped happening.
Today I had this error, in my case it was because Microsoft released the update (KB2858725) the FrameWork 4.5.1, which the download and installed,
However this is definitely addressed by performing the following steps:
FrameWork 4.5.1 download (KB2858728) => NDP451-KB2858728-x86-x64-ENU.exe-Allos
http://www.microsoft.com/en-us/download/details.aspx?id=40779
Install the downloaded software (KB2858728)
Try Vs, but give the same error.
Uninstall the downloaded software (KB2858728)
(this task fully cleaned upgrade giving problems (KB2858725)
Install the downloaded software (KB2858728) again
Try Vs, this time if it will work
NOTE: NEVER! install update (KB2858725)
Logging helps indeed. I have the same problem with crashes. Since there could be numerous reasons and lots of log data, I wrote this .bat (Win7 x64, VS2010 Express) to keep logs organized and easy to analyze:
#echo off
rem date and time in format YYYYMonDD_hhmmss
set year=%DATE:~-4%
set month=%DATE:~3,2%
set day=%DATE:~0,2%
IF %month%==01 set monthstr=Jan
IF %month%==02 set monthstr=Feb
IF %month%==03 set monthstr=Mar
IF %month%==04 set monthstr=Apr
IF %month%==05 set monthstr=May
IF %month%==06 set monthstr=Jun
IF %month%==07 set monthstr=Jul
IF %month%==08 set monthstr=Aug
IF %month%==09 set monthstr=Sep
IF %month%==10 set monthstr=Oct
IF %month%==11 set monthstr=Nov
IF %month%==12 set monthstr=Dec
set now=%TIME:~0,-3%
set now=%now::=%
set now=%now: =0%
set now=%year%%monthstr%%day%_%now%
start "VS2010 express" "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\VCExpress.exe" /Log "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VSlogs\VS_log_%now%.txt"
I had the same problem. I cleared my settings. Configured environment to use C# development settings. Then i disabled all extensions against which disable button was present. I enabled them one by one while opening, running and closing solutions. I found the offending extension to be .Net reflector v 8.5.0.179 by red gate. I had VS2010, VS2012 and VS2013 all installed on my windows 8.1 enterprise 64bit. All of them had the same issue. Whenever i closed the solution VS would crash. Hope it helps.

"Unable to start debugging" - VS2010 ASP.NET MVC 2

I can launch debug session only once with VS2010 and ASP.NET MVC2. When I end the first session and try to launch another I can see...
"Unable to start debugging" - no other messages, I'm using Visual Studio Development Server instead of IIS, Windows 7 64-bit
I can add that few days ago I was working on Windows XP and everything was fine.
I've tried running as admin (I thought there are any privileges issues) - no result
checked http://msdn.microsoft.com/en-us/library/dwesw3ee%28VS.71%29.aspx#vxtbshttpservererrorsthingstocheck (this page refers to IIS settings and I'm not using IIS)
I'm not satisfied with manually attaching - VS2010 is expensive IDE, it HAS TO work in this situation
Does anyone have some conclusions?
The problem auto-magically disappeared when:
I've turned off Debug > Edit and Continue option
Open vs2010 and run debug.
Turn off debug, shut down all launched WebServers (I had few of them for different services)
Close VS2010
Open VS2010.
After that everything works.
A simple restart of VS2010 sorted this for me
I've had this problem twice now and it occurs when I change my password for my computer. I have to go into IIS and change the password on the application pool to match my new password.
Also encountered this issue when updated AnkhSVN(I don't believe that updating could cause this problem but I didn't do anything else except code editing).
Closing Development Servers seems solve this issue until next time.
Microsoft Visual Studio 2010
Version 10.0.40219.1 SP1Rel

Resources