VS2010: "Unable to start debugging" - visual-studio-2010

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.

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 Web Server Could Not Find the Requested Resource visual studio debugging

Issue
I have a .net 4.0 Web Application running in visual studio 2012, every time I go to debug the site i'm receiving the following error:
The Web Server Could Not Find the Requested Resource
What I've tried
I've followed microsoft's website with solutions: msdn
From a command prompt window, run the following command: systemroot\Microsoft.NET\Framework\ versionNumber \aspnet_regiis -i
I've also attempted to remove the .csproj.user files
Since we use Source Control i've deleted all items, the site and apppool and reconfigured from scratch.
AppPool is set to allow 32-bit applications
All to no avail...Anyone have a solution that might solve this visual studio debugging nightmare for me?
Steps:
Close all solutions in Visual Studio
open IIS7 (run > inetmgr)
Click your top node (computer name)
Open the "ISAPI and CGI Restrictions" option
check if your .Net version has the correct restriction (for example, if you're working with 4.0 is should be on "Allowed")
I was getting the same error when i was running the ASP.NET project from the IIS. I resolved this issue by configuring IIS.
Go to run
type appwiz.cpl and press enter.
Look for "Turn windows features on or off" and click on it
now windows will open for Turn windows features on or off
look for Internet Information service and select that option.
go to world wide web service under the Internet Information service branch
expand Application development feature
Select all the ASP and .net version. and click on OK.
now try running the application from asp.net , it will work :)
I had the same symptoms but a completely different problem. I had attempted to install Url Scan and it didn't seem to work correctly as I could not find the .ini file to edit settings within. I had forgotten that I had installed it, but it appears by default it will prevent debugging from working.
Uninstalling Url Scan solved the issue for me. To uninstall it I had to right-click on the .msi file and choose Uninstall. Url Scan did not show up under the "Add or remove programs" section.

visual studio error attaching debugger

I just set up my machine to code Windows Azure apps in Visual Studio 2010. I have a machine at work, which works fine. The machines are both 64-bit Windows 7. I run as administator at work. At home I installed most of the VS and .NET components as normal user, but I'm running everything now as administrator, because I assume there could be some errors correlating to that.
Creating a standard Azure project with one web role gives me this:
"there was an error attaching the debugger to the IIS worker process
for URL http://127.0.0.1:5100/ for role instance 'xyz'...".
I searched Google 24 hours and tried most of the solutions, but none worked for me:
repairing .NET 4.0 (I didn't uninstall it prior to reinstalling, but
I will try to do so now)
setting the WebRole as Start Project works fine. It runs the webpage.
<system.web> <compilation debug="true" targetFramework="4.0" /> is set to true ( http://www.google.de/url?sa=t&source=web&cd=4&sqi=2&ved=0CDgQFjAD&url=http%3A%2F%2Fstackoverflow.com%2Fquestions%2F4541593%2Fazure-error-on-starting-with-multiple-web-role-projects&ei=RAhOTq27Fsv4sgaB_LSVAw&usg=AFQjCNFa6NveaRmUhBtEIus9vwK54VojKA)
there's no httpModules to delete ( http://natacha-huguet-millot.tumblr.com/)
there's only one v4.x directory in Windows\Microsoft.NET\Framework64 ( http://social.technet.microsoft.com/Forums/en-US/windowsazuredevelopment/thread/45e01c3d-7c16-4ca7-999b-46cb20b38c1d#0c118416-484a-413c-bd18-049033b1ccb8)
running aspnet_regiis.exe -r. succeeds but doesn't work ( http://www.dotnetspark.com/kb/3720-error-attaching-debugger-windows-azure-sdk.aspx) neither does rebooting
looking for Visual Studio Web Debugger log shows this (also my section name="httpErrors" overrideModeDefault in IIS is set to Allow; source: http://dunnry.com/blog/2011/07/14/HowToDiagnoseWindowsAzureErrorAttachingDebuggerErrors.aspx):
http://127.0.0.1:5100/debugattach.aspx
Status code=403 (Forbidden) Protocol version=1.1 Cached=False
Content-Length=53 Content-Type=text/html; charset=utf-8
Date=Fri, 19 Aug 2011 20:16:48 GMT Server=Microsoft-IIS/7.5
X-Powered-By=ASP.NET
/debugattach.aspx-application debugging not activated.
When I comment out the Sites-Tag in the ServiceDefinition.csdef I get the following error:
"unrecognized attribute 'targetframework'. note that attribute names
are case-sensitive"
Here I also tried most solutions to be found on the internet:
setting the right .NET-Framework version in IIS-Manager (all application pools are set to 4.0, when starting the project, the error page shows framework 2.0 though, where can I change it?)
installing the newest .NET-Framework, I have 4.0.30319
None of them work.
If you have any advice, I will try it and list my result in this post.
I was getting this due the the properties on the azure project being set up incorrectly.
I had to change the setting from IIS Webserver to IIS Express
The first question to ask is which version of Windows 7 are you running at home? I'm going to go out on a limb and guess that it's Home Premium and at work you run Professional.
The catch is that with Home Premium (an lesser edtions) you don't have the option to install the necessary components to be able to debug in IIS. To confirm this, on your work computer go to Control Panel -> Programs and Features -> "Turn Windows features on or off" and have a look under the IIS option. You'll see more there than you do at home.
I have not found anywhere in the MS documentation on the differences between various editions of Windows 7 that this is the case. I'd be happy for someone to correct me on this though.
To get around this issue is while running at home to change the project to run with Visual Studio Development Server (right click your project -> Properties -> Web) and make sure that you change it back to using IIS before you check in your code.
Or you can buy an anytime upgrade for windows to Professional.
Got the same error and fixed it by changing the defaults for the app-pools in IIS.
Start iis manager
Select application pools
On the right side, in the 'Actions' panel click on 'Set application pool defaults'
Set .NET framework to 4.0
OPTIONAL : Set Enable 32-bit applications to true
This worked for me:
Go to IIS -> default web site -> bindings
Set the default http port back to 80.

"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

Unable to use IIS7 with Visual Studio 2010, MVC2.0 and NET4

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.

Resources