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
Related
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.
My VS2010 debugger has stopped functioning suddenly today on my Dell M4500. I had reinstalled VS2008 SP1 last week, but the 2010 debugger ran fine since then, so I'm not sure its the culprit.
I can launch a project once just fine, & afterwards I get a message that reads "Unable to start debugging," without any error # or explanation of why. Doing IISRESET doesn't help, I get the same message until I close VS with the entire solution and reload it. Here are some things I've tried:
Verified I have the latest project files
Repair option for VS2010
Complete uninstall/reinstall VS2010
Replaced Web.config with known good copy
Added localhost to the list of trusted sites in IE
Performed \aspnet_regiis -i in the 2.0 & 4.0 directories
Through IIS Services Mgr -> Default Website:
verified Enable HTTP Keep-alives checked
placed check in Integrated Windows authentication
Ensured Debug on "Any CPU" is selected
Tried building to Platform targets "Any CPU," "x86" & "x64"
Added DisableLoopbackCheck registry key entry in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
Tested under both IIS & VS Development web server
Does anybody have any suggestions I can also try? Any help is very greatly appreciated!
Just a side note. I got a similar error in VS2013 trying to attach to chrome the error was:
Unable to attach the application 'chrome.exe' using XXX The 32 bit
version of the visual studio remote debugging monitor (msvsmon.exe)
cannot be used to debug 64 bit processes or 64-bit dumps. Please use
the 64-bit version instead
I had to untick "Silverlight" in the web project Web section:
I received this same message, preventing my web project from running and opening in a browser. Turns out another developer had made a change in the project properties to "Use Custom Web Server" which pointed to an external URL instead of to the web server on my machine.
Try this:
Right-click your project in Solution Explorer - click Properties - click Web tab - under Servers click "Use Visual Studio Development Server". For reference the usual port value here is "Auto-assign Port". Best of luck.
Here's why I got this error.
In Debug properties, verify that Start external program is not empty.
VS 2010 will warn you about it being empty, but will let you save it
I was trying to switch it from IE to Chrome, lost track of changes I was making, and spent an hour trying to figure out where this error was coming from.
I had the same issue but it worked when I switch Build => Platform target from x64 to x86.
Kindly turned off Debug Edit and Continue option
Turn on vs2010, run debug.
turn off debug, shut down all lunched webServers (i had few of them for different services)
Turn off VS2010
Turn on VS2010.
After that everything works perfect.
Just installed VS2010 express for Windows Phone last night. Install went smoothly. It creates a project, compiles, and deploys the app to the emulator.
Here's the problem: When I try to "Add Reference" through the Project menu, I do not get the Add Reference dialog box. Same thing if I right click References in the solution explorer and click Add Reference. That's not all. "File...Open" and "File...Open Project" also fail to throw up an open file dialog box. When attempting any of these actions, the IDE quickly loses and regains focus. Even pressing a keyboard shortcut (Ctrl+O) causes the IDE to quickly lose and regain focus, but no open file dialog box appears.
This is what I have tried, not particularly in this order:
1. Turned off UAC
2. Monitored file and registry access using Process Monitor during a File...Open operation. File activity showed mostly "SUCCESS" with a few "FAST IO DISALLOWED" and a few "INVALID DEVICE REQUEST" results. Registry activity showed mostly "SUCCESS" with some "NAME NOT FOUND" and a few "BUFFER OVERFLOW" results.
3. Created a new, clean Windows account to run the IDE from
4. Forced a test project to add a reference to "System.Xml.Linq" by editing the ".csproj" project file. Project failed to load in the IDE.
I don't have these problems at all on 2 other Windows 7 computers with VS2010 C# express beta 2 installed. One machine is 32bit and the other 64bit, both Home Premium edition.
My system: Windows 7 Home Premium, 64bit
Other Visual Studio products installed: VS2008 C# express, VS2008 C++ express
One other thing to note: Several months ago I installed the non-phone distribution of VS2010 C# express beta 2, and I had the same exact problems. Back then I chalked it up to being beta and went back to VS2008 C# express, where I do not have these issues.
Matt, if you're still reading this post, I have a solution:
Do you have the Tablet PC Input Service disabled? Enable and start it. This was suggested to me over on the MSDN forums, and it worked for me immediately. I have this service disabled, but I turned it on, fired up VS2010, and it just worked right off. I confirmed this solution by turning the service off again, starting VS2010, and noting that it breaks once again. Turned the service on once more, started VS2010, and it works perfectly. Amazing.
I do not think it's acceptable to require this particular service just for VS2010 to function correctly. Hopefully they fix this in the inevitable service pack. FYI, I had this service disabled because I turn off all services I don't require. So now I have two "wisptis.exe" tasks eating up ~8MB of RAM and starting every time I turn on the PC. Or I can shut the service off again and just resort to my previous workaround. haha
Here is a work around.
Just run wisptis.exe from command line and start the visual studio.
If you don't wanna run each and every time you restarts the computer,then just put wisptis.exe in a .bat file and move it to the startup folder,so that it will be automatically executed on each and every startup.
EDIT 1 :- Or else just press 'WIN'+'R' and type 'wisptis' and press 'Enter'.
I experienced the exact same problem. I'm running VS2010 Express on Windows 7 (x64). Re-enabling the "Tablet Input" service "fixed" the problem.
VS2010 has always worked fine, and then suddenly for no apparent reason "ctrl-O", "Add Reference", "Open Project", and other similar functions stop working.
No amount of repair/uninstall/reinstall would fix the problem.
I always disable the "Tablet Input" service on Win 7, because I use a Wacom tablet, and dislike the visual notification of (tablet) mouse clicks this service causes. VS2010 has so far been working fine in this setup with Tablet input service disabled, but then suddenly the problem arose, and I had to re-enable the "Tablet Input" service to make it go away.
I have another computer with the exact same setup - Win 7 (x64), VS2010 Express, Wacom table, and disabled "Tablet Input" service - and here VS2010 is still working just fine. Both computers also have almost identical software installed and updates installed, so I still have no idea where the difference lies.
Has anyone had more luck in finding the root cause?
I also use Power Toys, but I have not been able to correlate this installation with the problematic behavior of VS2010.
I'm having close to the same issue with the exception that my New | Project dialog works, but Add Reference and Ctrl + O just cause the interface to lose focus and regain focus without every launching the dialog. I have tried running devenv /ResetAddin and devenv /ResetSkipPkgs, but neither helped. I have UAC turned off as well. I don't experience the issue with VS2008.
Here's my setup:
Windows 7 Ultimate x64
Visual Studio 2010 Ultimate RTM
Visual Studio 2008 Team System Developer Edition with Team Explorer 2008 and VS2008 SP1
The only addins I run:
GhostDoc
.NET Reflector
Other Related Products I run:
Microsoft Expression Studio 3
SQL Server 2008 Developer Edition with SP1
tonight I uninstalled the VS2010 Express beta 2+phone tools and installed the now final RTM VS2010 Express C#. It STILL had the problem! For kicks, I tried importing a VS2008 project because it has some extra references in the project, and I was curious how they would be handled. The project imported successfully, but compiled with errors that it couldn't find a reference for a SyndicationFeed object, even though the reference for it was successfully added to the References list upon import. I remove the reference (System.ServiceModel.Web), hold my breath, and try to Add Reference one more time. Amazingly, the Add Reference dialog pops up, I add the reference back, recompile and bingo. File...Open and File...Open Project now throw up the proper file open dialogs as well.
To be sure this isn't a fluke only related to importing an old project, I shut down VS2010, start it back up, create a brand new project and try Add Reference. It works still. The File/Project dialogs also show up. I have no idea how, but importing a VS2008 project apparently made VS2010 correct itself on my machine.
Thank you for replying to my post. After hours of Googling over the past few days, your post is the first I've seen of anyone else having this issue besides me.
I found a workaround, but it's annoying having to do this:
1. Create a new project
2. Close VS2010, don't bother saving the new project
3. Start VS2010 again, and everything works as it should. I can access the Add Reference dialog, and I can do a File...Open and Open Project from the menu and toolbar.
If I close VS2010 and start it again, it is broken once more. Performing my workaround fixes it again for that session.
Still looking for a permanent solution.
I finally figured out a work-around. If I temporarily disable the Power Tools, the original Add References dialog opens fine. After adding my references, I can enable the Power Tools again.
Here is my environment
Windows7, Visual Studio 2010, MVC2.0 and NET4
My default web site is configured to use ASP.NET v4.0 application pool.
Here is an easy way to reproduce my problem
Create a new MVC2 application
Open the properties Window
Go to the Web tab
Check "Use IIS Local Web Server"
Click on "Create Virtual Directory" button
I get this error message
To access local IIS Web Sites, you must install the following IIS components:
In addition, you must run visual Studio in the context of an Administrator account
For more information, press F1
Notice the blank line after "...the following IIS components:"
I am running VS2010 as administrator
Pressing F1 does not bring any help
I checked my Windows eventlog files and found that my metabase was corrupted
(I thought we get rid of this in IIS7 but it looks like it is still here...)
I used this Microsoft article to restore it from an old version and now everything is working
Hope this can help somebody else
Have you tried running VS as administrator?
Right click your VS shortcut and select "Run as Administrator"
I had the same error message, in my case with VS2008, Windows 7 + IIS7, when trying to add an existing web site to a solution. I think this is one of those error messages where what it states can be a big red herring, i.e. it doesn't necessarily have anything to do with running as an administrator or not having components installed.
In my case, the web site had an HTTP binding in which the hostname was set to "localhost". Once I cleared that, it worked fine. Don't ask me why I put "localhost" in there, it just seemed to make sense at the time.
My internet hunting also turned up this brief entry, which did not work for me.
I have a web application that I've always been able to run in Visual Studio and it debugs just fine (breakpoints work, I can pause execution, etc). Recently, the behavior changed suddenly, and a few things happen:
I start debugging, it lauches IE and loads the application, but after a few seconds (sometimes the page hasn't even displayed yet), Visual Studio acts as if debugging has stopped - I'm able to edit code in VS again, and the "Play" button on the toolbar is enabled. The application continues to run in the IE window just spawned, but I'm not attached to it
During this few seconds that VS is "debugging", because it detaches, my breakpoints show as hollow - as if I'm set to "Release" mode and they won't be hit. In fact, I have a breakpoint set in Page_Load, and it skips right by. I've checked, and I'm set to debug mode, though the compile mode dropdown is missing from my toolbar (I checked in the build properties to ensure I was in debug mode).
Can anybody shed some light here?
It turns out that this was actually a result of an upgrade to Windows Vista. VS wasn't being "Run as an Administrator", which caused it to lack the rights to attach to other processes for debugging. As a result, debugging would stop right after it started. Changing the VS shortcut to run as an administrator resolved this problem.
I've experienced samely looking behavior. The cause was in existence of several <system.web> sections (which is allowed by web.config schema). Visual Studio debugger (versions 2008 and 2010 were tested) looks in the first encountered section only. So if your <compilation debug="true"> tag is not in the first one, it thinks that there are no compilation.debug setting present and genrally tryes to add <compilation debug="true"> to the first <system.web>. In some cases VS2008 just silently procceds in this case. For example look here: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=510354#details"
Have you installed anything else on the server / workstation recently?
We have a third party app that doesn't allow us to debug, w3wp.exe crashes immediately upon an attempt to debug.
I ran into something similar when I had placed some code in a constructor that was crashing. Exact same issues where the Debug would disconnect just after the application started up.
The short if it, check that you haven't configured a class constructor to run during web startup that is crashing...
Quick windows 7 update: I had to add "localhost" to my list of trusted sites to correct this issue...go figure.
Just a workaround for those (like me) for whom the above solutions do not work: After starting the app you wish to debug, go to Debug -> Attach to Process, and attach it to the process you want to debug. Works on my machine.
In my case, I faced this issue with Visual Studio 2019 and 2022 as well.
I tried upgrading/downgrading Visual Studio versions but nothing helped.
On debugging, I finally found the root cause and sharing it here to help others facing the same problem.
I was using Brave browser with Visual Studio and whenever I uploaded a file in my application, the Visual Studio debugging stopped automatically. The root cause of this issue is the feature in Visual Studio to stop debugging on closing the browser. With Brave browser Visual Studio feels like we have closed the browser on uploading the file. So to fix this issue I have turned of this setting as given here.
You can find this setting here
Tools > Options > Projects and Solutions > Web Projects > Stop debugger when browser window is closed, close browser when debugging stops
Just turn it off and everything should work fine.