4

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

Daniel Gent
  • 91
  • 1
  • 6
  • Silly question, but worth asking: you are running Visual Studio as administrator, yes? – Jeremy McGee Sep 29 '11 at 11:56
  • much thanks for the replies. @asdfg: so when i first ran the repair tool it gave me an error. stupidly i didnt write this down but it was along the lines of "cannot find sf.cab etc etc try uninstalling" (it was some .cab file there was a problem with). i uninstalled it properly using the Microsoft Visual Studio 2010 Uninstall Utility (from http://archive.msdn.microsoft.com/vs2010uninstall/Release/ProjectReleases.aspx?ReleaseId=4321) and then reinstalled. still the same problem. i could try running the repair tool again to see if it gives the same error? – Daniel Gent Sep 29 '11 at 14:15
  • @jeremy mcgee: at this point i'm thinking that 'silly' questions are much needed! i am running it as an administrator yes, but if there's anything else silly i could be doing please let me know :^) – Daniel Gent Sep 29 '11 at 14:15
  • My own approach has always been to leave existing VS install(s) in place and just run them side-by-side with the new version. If you have a convenient restore point set you might want to try this instead :) – IrishChieftain Sep 29 '11 at 15:23
  • Did you try http://stackoverflow.com/questions/2878136/vs2010-error-unable-to-start-debugging-on-the-web-server – plodoc Sep 29 '11 at 16:38

8 Answers8

7

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.

user2299804
  • 71
  • 1
  • 2
1

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.

79E09796
  • 2,120
  • 1
  • 20
  • 33
1

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

IrishChieftain
  • 15,108
  • 7
  • 50
  • 91
  • that could probably explain why i'm running into such problems. Do Microsoft not bother with MD5 hashsum checks or similar so I can check it is not corrupt? Usually I would expect the download to fail. I got VS from MSDN, along with windows 7 ultimate N, that I'm running now. I painfully have gone through several guides to make sure all the right components for IIS are installed. ;^) Thanks for the help, much appreciated!" – Daniel Gent Sep 30 '11 at 08:36
  • thinking about it, i'm quite sure that its the same ISO i downloaded to install VS2010 on my laptop (which worked first time!). but if there is a tool for hashcheck then that is something i really didnt think of. :^) – Daniel Gent Sep 30 '11 at 08:40
  • just ran sha1sum.exe (from GNU) and got the same result f0ed50712d83bf0eda7d284da76df49e4c88cef7 as listed on MSDN. bah! – Daniel Gent Sep 30 '11 at 08:50
  • Sometimes you have to wait a bit at the end of the download/install for the check to kick in. Use a different browser, make sure you're getting the correct link in MSDN (VS page really confusing) and grab a new download :) – IrishChieftain Sep 30 '11 at 13:49
  • 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. – Daniel Gent Oct 05 '11 at 16:01
  • I usually install SQL Server first, then versions of VS in order: 2005, 2008, 2010... – IrishChieftain Oct 05 '11 at 16:24
1

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

Daniel Gent
  • 91
  • 1
  • 6
0

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

dmarges
  • 361
  • 2
  • 7
0

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.

ury
  • 1,050
  • 11
  • 22
0

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.

Altaf Sami
  • 846
  • 5
  • 10
  • 21
0

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.

Ling
  • 11
  • 3