"unable to start debugging on the web server" MSVSMON.EXE failed to start. VS2010 error - asp.net

having a real problem getting VS2010 to debug IIS.
I've searched on the internet for a few days now and tried every single solution I can. VS2008 works perfectly but I've installed VS2010 and when trying to debug an IIS site (by pressing F5 on a project that uses IIS) I get the error message
"unable to start debugging on the web server. Microsoft Visual Studio Debugging Monitor (MSVSMON.EXE) failed to start. If this problem persists, please repair your Visual installation via "add or remove programs" in the control panel."
when i try attaching the process manually, i get the same message.
I've tried repairing the software. I tried it, it failed, so I uninstalled using the Microsoft Visual Studio 2010 Uninstall Utility (http://archive.msdn.microsoft.com/vs2010uninstall/Release/ProjectReleases.aspx?ReleaseId=4321), then reinstalled and it still has the same problem. With the SP1 update this still happens. I can run the website fine when running "start without debugging" and it runs fine.
I've gone through all the guides I can and all tried all the settings on IIS I can and still no luck. I'm using Windows 7 64bit if that means anything. I can detail much more about all the things i've tried.
also have a laptop and have done the same, installing VS2010 and TFS (also on win7 64bit), and this works perfectly for debugging. Didn't have to mess around at all. I can't see any difference between this and my PC with the problem. I'm scratching my head here and thinking I might have to format my PC and try again from a fresh install (which would be seriously annoying!)
Thanks to anyone that reads this,
Dan Gent

I had a HOSTS file entry resolving the project URL to a DEV server instead of local machine. Changing the entry to point to 127.0.0.1 fixed the problem.

Are you installing from a purchased disc or did you download it? Either way, you need to download a fresh copy and install that (sounds like original is corrupted).
Also, make sure you have all the IIS & Web components installed on your machine. Is your OS home or basic?
http://technet.microsoft.com/en-us/library/cc731911.aspx

i've fixed it now. ended up formatting machine, reinstalling windows 7, and then taking backups everytime i installed a new program so i could roll back. installed VS2010 first, F5 worked. then installed VS2008 & everything else and debugging still works on VS2010. not sure what happened as the above problem happened on a fresh install. something must have corrupted something somewhere
thanks for all your help and narrowing this problem down to something that was worth formatting my PC to fix.
cheers,
Buswell

This can also be caused if you are using a host name in IIS and make a mistake in your hosts file.
Check that the hosts ip is set to the local machine 127.0.0.1 and not somewhere else. In my case I had accidentally set it to the development server.

Have you tried starting MSVSMON manually? I had the same problem you are and found the service was stopped. So I tried enabling the service and made sure that it was using the correct credentials.
I hope this helps!
Thanks!
Don

The only thing that worked for me after I tried practically every solution on the Web is to right-click the project on the solution explorer, and select Debug->Debug as Administrator.

Right click on Project, "Use Custom web server" checkbox will be selected, select check box "Use local IIS web server".
I resolved this issue with this and its working.

Managed to resolve this error by At solution explorer-> right click the project->select Debug->Start new instance.
I think it was because i had copied the project folder from another server.

Related

Unable to start debugging on the web server. The remote server returned an error: (404) Not Found. Error when starting debug in Visual Studio

I have set up project to be run on IIS for some time ago and when I did press F5 it did connect no problem. But recently this stopped working and I did get this error when I press F5 / press Debug->Start debugging:
Unable to start debugging on the web server. The remote server
returned an error: (404) Not Found.
Here is my settings:
I am not sure what happened, probably some VS updates or Windows updates, but I've tried to google everywhere and nothing had worked. Attach to process works fine as before, but this simpler way stopped doing the trick.
Update:
Have tried Process Monitor to figure out what is going wrong and it looks like w3wp tries to access path MyProjectFolder\debugattach.aspx and the result is "NAME NOT FOUND". Don't know if this is the root of the problem though.
It appears that one of my colleagues has edited the web.config and added request filtering where he has removed the "DEBUG" verb. This disallowed debugging on F5.
After adding it (or removing request filtering) everything works fine.
P.S. A lot of other possible problems with similar error is described here
In my case (Windows 10 & Visual Studio 2017) I had to install ASP.NET 3.5 and ASP.NET 4.7 under the Internet Information Services.
Click here to see the solution
Old post but I recently had this issue and making sure that the following settings were enabled in 'Programs and Features' (Windows 10) fixed the issue for me:
This happened to me because I was using the Rewrite module to redirect to https. I was running https://localhost/WebSiteName, but had put my machine name in the https binding in IIS Mgr, Default web Site, Bindings. When I removed the machine name it worked.
Recently I have faced the same issue in VS2013 Professional, instantly I get error 'Unable to start debugging on web server". I observed that whenever my current page is MVC view (.cshtml) file and I start debugging , the error window prompts every time. As switch the current document in my project to controller (.cs) file, and starts debugging, it works properly.
So my workaround is to debug my code I have to be on (.cs) file not on (.cshtml / web.config) file. Hope that helps!
Another reason for this problem is that you don't run visul studio Run as administrator.
My issue was related 405 as attached below
My issue got resolved after making my projects properties(Web and Build) as given below
see this also
HTTP Error 404.3-Not Found in IIS 10 as it helped me (HTTP Activation need to be enabled in Windows features)

Can't run IIS Express from VS2015

I've made everything like it has been described here. But when I started my Visual Studio project - it said: "Unable to launch the IIS Express Web server". The start URL specified is not valid. http://dev.local/". By the way, I can launch it, using cmd ("run as administrator", ofc):
> iisexpress /site:WebApiLocal
So, whats the problem? Where am I wrong?
P.S. Visual Studio has been launchedwith admin's rights.
Ok, I had found solution. I've used local applicationhost.config, which placed in {SolutionDir}.vs\config directory. So, if you have the same problem, check this file or go to the {UsersProfileDirectory}\Documents\IISExpress\config and edit applicationhost.config. Also, you can edit in .csproj tag UseGlobalApplicationHostFile saying to project what kind of applicationhost you want to use:
<UseGlobalApplicationHostFile>True</UseGlobalApplicationHostFile>
Thanks everybody for ideas!
This can happen if you use an external program (e.g. git) and accidentally delete the applicationhost.config file. A restart of visual studio recreated the file in my case, and it started working again.
According to other posts, Visual Studio 2015 specifically requires the site bindings to use localhost as host name. No matter what posts show you that you can otherwise modify the config, the modification just works under command line but not in VS.
Either Microsoft patches VS later in an update, or you revert your manual changes.
I meet the same issue after I enable remote requests in IIS Express. to solve this, you have to remove the urlacl you set before.

Debugging ASP.NET in IIS 7

I have searched all the usual but come up empty. I must be doing something silly!
Simply I created a new project, ASP.NET Web App, and wish to use and debug it with the local install of IIS 7.5 on my Windows 7 x64 box.
According to what I have read it should be a simple process; my issue is that Visual Studio will not stop at breakpoints nor at errors etc.
I just don't get it:
Visual Studio is attaching to the w3p process for me automatically.
If I hover over the breakpoints it shows a message saying the same, that it is in the same w3p process.
I am in Administrator context. I manually ran it like so to be sure but in any case if you are an admin it runs like that anyway.
Some notes:
I do not wish to use IIS Express as I require native IIS 7.5 for my tasks, however it does debug in express - no surprise there.
As mentioned above, all this is being done locally.
The path of the virtual directory is pointed towards the project files, as set by Visual Studio 2010. It even set the Network Service as read on the folder structure.
When debugging from VS the web site runs fine, just debugging is the issue.
Maybe it is permissions? The Default App Pool is using the ApplicationPoolIdentity not Network Service... Should it be? I had assumed they we.re one and the same essentially. Although I changed this and no luck unless I didn't do something I should of
Keep in mind here that my issue is semi-unique in that I am not receiving error messages, not even in the event logs... For all intents and purposes it should be working fine, just it isn't.
VS and IIS, and all updates, are applied to date.
Note: I'm familiar with IIS7.5, I run my own public web hosting server. I just never tried to debug
Note: It is Visual Studio 2010 Ultimate
Thanks for your time.
Sigh!
I went back to basics... Uninstalled IISExpress and tested; It worked! Re-installed IISExpress; It worked!.
I guess installing IIS7 native after IISExpress did something screwy? I had ran the register ISS command on IIS7 when I installed it.
Right, so now I have both installed in tandem and they work fine. Thanks for all your help guys, appreciated.
you can try right-click on project in VS go to properties select web from left menu tab. Check if ASP.NET debugger is checked and also you can select Use Local IIS Server and give localhost url there (in project Url textbox) and then Say start debugging from VS and put breakpoints.
I had a similar issue the other day, I attached the debugger to the wrong w3p process, make sure you attach it to the one the app pool identity is running under.
I wanted to write it as comment by I don't think I can add pictures..
Are you sure you are running the same version of dll?
Is your breakpoint filled like this?
or hollow like this?
1st go to ,Program and Feature in control panel and then in that turn on or off windows features. and now check all check boxes(activate features) related to Internet Information server & windows service managers. once this is done run your visual studio as administrator and then attach to right w3p process.

VS2010 Ultimate - Unable to launch ASP.NET Development Server

I've worked with ASP.NET once before and had a project where it was potentially useful, so I started creating an ASP.NET website as part of a solution that contained several C# class libraries.
I'm using Visual Studio 2010 Ultimate Edition and Windows 7 Professional x64. The issue is that when I try to debug my website project, I get the following error message:
Unable to launch the ASP.NET Development Server
There's no other information (it seems a popular variant is the "port in use" error).
Interestingly, I can run single pages on the application by right-clicking on the ASPX and selecting "View in Browser". This does not allow me to debug into my breakpoints, though.
I have no clue what the problem could be. I'm running VS2010 in Administrator mode. One of the questions that popped up here suggested I uncomment the "127.0.0.1 localhost" line from my HOSTS file, which I did, and restarted VS with no luck. I also tried both setting a static port for the web server to run on as well as let it dynamically generate one. Both do not help the situation.
Any help?
Thanks.
Added on 5/20/2010 at 9:25 CT
I can debug by attaching to the process. However, this is still a painful way to debug quickly so I'd still like a solution to the problem.
There are some things to check before listed here
Please eliminate issues on the link and check whether you may debug
Hope this helps
Myra
The problem was I had a InstallShield Lite project which was apparently causing problems. Once I unloaded that project, I can launch the development server in debugging mode.

Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner."

I get the following error pretty regularly when compiling in Visual Studio and running my web application:
"Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server."
Normally this is after having debug the application once already. From the command line I run "iisreset /restart" and it fixes the problem.
How do I prevent this from happening in the first place?
The solution that worked for me:
Open Command Prompt (Run as Administrator)
Write iisreset /restart
Now, go back to your VS and debug. It will debug your solution.
It worked for Visual Studio 2013 and 2015 too in my case.
I find that this happens if I'm debugging with Firefox as my browser. When I exit Firefox the VS2005/8 debug session doesn't terminate. I have not found a solution for this (yet).
If this is what's happening with you then a quicker solution than running iisreset is to hit Shift-F5 when in Visual Studio and this will terminate the current debug session. You can then hit F5 and this will start a new debug session.
After trying all of the proposed solutions here and in other places (at least 10 different approaches), the only option that worked for me was:
delete website and application pool on IIS
re-create website and application pool on IIS (in my case, everything exactly the same config as before)
PS: I am using VS 2013 and IIS 7.5 (Win7).
I hope this saves someone else a few hours.
Go to task manager and end process aspnet_wp.exe before running application
I have had this problem a couple times. One time it was resolved by taking Guy's advice:
If this is what's happening with you then a quicker solution than running iisreset is to hit Shift-F5 when in Visual Studio and this will terminate the current debug session. You can then hit F5 and this will start a new debug session.
On a separate occasion I had to: terminate all my IIS worker processes in the windows task manager (w3wp.exe*). You should be able to hit f5 in visual studio to debug.
It sounds like you are probably hitting F5 in Visual Studio when you receive this error?
There are a few things you can try. The easiest is to hit the Stop button before hitting F5. Optionally, when you are finished debugging and starting to make changes you can go to the Debug menu and choose either Stop Debugging or Terminate All.
We use another way of debugging, we never use F5 anymore.
We use a macro kind of like: http://blogs.conchango.com/howardvanrooijen/archive/2007/06/24/Attach-to-Web-Server-Macro-for-Visual-Studio.aspx (Which we bound to F6).
This way you simply attach the debugger to IIS. It's (depending on project size) much quicker to make you changes, compile a single project that you changed and attach the debugger again.
When debugging 2 web application (1 MVC and 2 is MVC WebAPI) that are both hosted in the local IIS.
Make sure that each application is using a different application pool.
I encountered the same issue and as soon as I change the app pool of the other one, it worked!
I saw this message first time in my life and I was very confused about what is going on as it is not pretty obvious what to do.
I ran iisreset and it took just 1 sec to finish the execution, and boom, I was back into the game.
P.S. I am using chrome
Hit Shift+F5 when in Visual Studio and this will terminate the current debug session. You can then hit F5 and this will start a new debug session.
or
close your application, reset iis then open your application and run it
For me I had two visual studio open. The debugger already was attached to another visual studio :). I stopped it on the first one and was able to attach on the second visual studio.
Very basic - but check that if you try to run the web site from IIS by clicking on "Browse", the site actually runs.
It sounds like something is eating up your web server's resources. Perhaps you have some resources (file handlers, wcf proxies) that are being opened and not closed? I've had this happen to me specifically when I was not closing WCF client proxy connections.
The problem is not necessarily that you have a debugger attached, but only that the web server is not responding in a timely manner. Note that the message says "This may be because another debugger is attached".
If you have a lot of break points this will slow the debugging process down, so remove unneeded break points and close the Autos window this will solve your problem
The issue is normally there when an another instance of iexplore is still running. I used to have the issue when my IE crashes but I can still see it in the Task Manager. Once you "End Process" everything is back to normal :)
I ran into this issue when trying to debug (2) separate solutions in VS.NET and both were using the IIS Web Server to launch the app. The 1st application will start, but any subsequent applications started that also run via IIS will then display that error. It seems that it can only debug a single application via VS.NET hosted in IIS at a time.
The solution: run project 1 from VS.NET (place any needed breakpoints) and start the second application directly from IIS (not VS.NET). Your breakpoints in App 1 (running in VS.NET) will be hit when accessing App 2 (ran from IIS directly).
This happens to me quite a bit in VS 2010 express - Usually because the debugger stopped responding.
Right click windows taskbar, select 'Start Task Manager'. More than likely the ASP.NET debugger will be showing a 'not responding' status. Select it and simply terminate the process.
Done!
With me it happened when IE was upgraded to newer version, went to Installed Updates, removed new version of IE, after computer restarted it went back to old version and problem with debugging was solved
Had the same problem, even after a reboot. Basically did this:
Restart IIS
Clean Solution
Rebuild Solution
Then it started working again.
This can also be caused if your website uses a database connection but the database server is unavailable.
I spent some time trying to resolve this issue in the usual ways, but even after restarting my workstation, the issue remained. Eventually I found that the SQL Server (MSSQLSERVER) service was not running.
It should have been running, as it's set to Automatic, but it was stopped, even after the reboot. All the MSSQLSERVER events in the event log appeared normal, so it remains unknown why it wasn't running, but I have now set it to Automatic (delayed start) in the hope that this will reduce resource contention during startup.
Once I started MSSQLSERVER , the message "Unable to start debugging on the web server. The web server did not respond in a timely manner" no longer appeared and normal service was resumed.
I had to recreate the site/application/virtual directory to make it work after I installed vs2015 update3. Hope this helps someone. ;)
I know this is an old question, but I met the same situation recently and try every solution in this post, and no luck. Finally, I found the solution that works for me:
Close Visual Studio
Find Turn Windows features on or off in Control Panel
Uncheck Internet Information Services in the popup dialog
Restart your computer
Check Internet Information Services in the same dialog, and make sure Internet Information Service -> World Wide Web Services -> Application Development Features -> ASP.NET also been checked
Open Visual Studio, and now your application should be able to run in debug mode
Open
Options and Settings Under the debug
Symbols and unchecked Microsoft Symbol Servers
build solution
iisreset
F5 solution
(Be sure Microsoft Symbol Servers unchecked again)
This worked for me by #mtkachenko
Visual Studio 2012: Unable to attach the process. A debugger is already attached
"I have installed Debug Diagnostic Tool v2.0 and as a result I have Debug Diagnostic Service which is started automatically and attached to one of w3wp processes. After turning off and disabling this service all works fine. So if you get such error check processes in task manager which can capture your w3wp process"
I got it worked by creating a new ApplicationPool in the IIS Server and pointing my application to the new ApplicationPool. I have also deleted the old ApplicationPool
This answer will only apply if you are running your solution through IIS. You will know if this applies to you IF you open up your website/project by doing the following:
From within visual studio-->Open Website--> Local IIS -->Select your project
This error Kicked my butt for 4 hours but finally I found an answer. I first attempted the iisreset /restart. This seemed to slightly help but still received the same error.
What worked for me was going (xp machine) to add/remove programs --> Add/Remove Windows Components--> Click on IIS--> Click on "Details". Be sure to have Front Page Extensions installed if you are debugging through IIS.
If all the answers does not work for you, just end process all IIS related components in task manager. This is what worked for me.
I just solved this problem on my machine.
My problem is that I upgraded IE 9 To IE 10 and I got this error.
Solution : Remove IE 10 and downgrade to IE 9.
Go to "Programs and Features" --> "View recent updates" --> find IE 10---> Uninstall it-->reboot--->ie 9 is back--->debug--->works OK.
Try performing either of the following steps to resolve your issue:
Restart your IIS Server
Clean the Solution of your project then build again
If above steps do not help, you can finally try restarting your machine
In your cmd type iisreset and press enter after that your iis is reset and your application is working perfectly

Resources