Problem with debugging ASP.Net application on IIS 7 on Windows 7 - asp.net

Few weeks ago I started using VS 2008 (Professional) with Windows 7 (Enterprise).
When working with ASP.Net web applications I repeatedly stumble over the following error:
After opening a solution with a web project the first compilation and debug go perfectly fine. The second time I try to debug the solution I get the "Unable to start debugging on the web server. System call failed" error and solution does not start at all. When I try to debug it again it always shows the same error but sometimes the app actually starts but does not break on the server code at all.
Any ideas why this could happen?
Thanks a lot for any suggestions.
(I use local IIS and run VS as Administrator)

Have you installed SP1 for VS 2008? I am using Win7 as well, and alot of the issues get magically resolved with a service pack. HTH.

Related

Error while running asp.net apps in Visual Studio 2015

In my company I'm running Visual Studio 2015 Enterprise and just recently upgraded to Windows 10. Unfortunately, now I can't run any web project using versions of asp.net earlier than 5 (owin/katana) - always getting error :
"Could not load file1or assembly 'XXX' or one of its dependencies.
The process cannot access the file because it is being used by another
process. (Exception from HRESULT: 0x80070020) ".
Now, I've found a few posts like this and the answer is mostly that some other application is running on port 80, 8080 etc blocking visual studio's iis express. The problem is that I get this error regardless of port I'm using (even on some random 34535 etc).
The interesting part is that when I run kestrel (app on asp.net 5) it works and runs fine without any error.
Anyone has any ideas ?
Okay, so I had this issue and resolved it by uninstalling Panda antivirus, which presumably was locking the assemblies for just long enough to interfere with loading them some of the time.
If anyone else is having this issue, and there is definitely an assembly that won't load (as opposed to a port that's already been bound to) then try checking your antivirus!

"An operation is not legal in the current state" error when trying to launch ASP.NET project in VS2013?

I have an ASP.NET web site created with WebMatrix 3. I do have the option in VS2013 checked to use the 64-bit version of IIS Express since I am running on 64-bit Windows 8.1. When I try to launch the project I get the error "An operation is not legal in the current state". Does anybody know how to fix this?
I got this same error "An operation is not legal in the current state" when running a project on Google Chrome, Stopping the project then closing all chrome instances fixed the problem.
I think it's related to visual studio not being able to attach to chrome instance for debugging.
Closing Chrome and restarting IIS (e.g. in IIS Manager) should solve the issue. It helped in my case.
Just had the same issue on VS (Visual Studio) 2017 this morning.
The steps that will resolve this are:
Stop project that runs in VS
Clean all IIS instances that VS temporarily created
Compile project and start that service again

Cannot run any web application in VS 2010/2012 getting "Unable to start program"

Since this morning I cannot run any web application in Visual Studio 2010 or 2012, getting the following error:
No break points are being hit in the Global.asax. I thought there's some issue with dll's I'm referencing so I tried creating a clean new web forms and MVC-4 applications using both 2010 & 2012 but still getting the same error
Try going to http://localhost:2980 in your browser without debugging in Visual Studio. It should give you a more accurate error.
Some other things to try
delete your bin and obj folders (Clean your solution)
restart Visual Studio or even your OS
restart IIS
run aspnet_regiis -i
some more things to try
if you installed web express first, http://forums.asp.net/post/5373941.aspx
try running visual studio in repair mode
Seems like there's a problem with Internet Explorer(I'm using version 10) If i run the site in Chrome or Firefox it works fine

Unable to attach to application [iisexpress.exe/webdev.webserver40.exe]

As of right now, I'm unable to debug any of my ASP.NET web application projects on a completely fresh machine because of the error message above. I'm trying for hours now and it's driving me completely nuts because I'm getting paid for working, not for debugging strange environment errors. :/
Installation Procedure / Environment
Installed Windows 8 Professional x64
Installed Visual Studio 2012
Installed Visual Studio 2012 Update 3
Installed IIS through Windows Programs And Features
Nothing else has been done - no addins, no further configuration etc. Administratior permissions are available...
Error message
Unable to attach to application 'webdev.webserver40.exe_00001254_
01ce76431af5c900_dc2119bc-2761-480f-b975-4fab7ad27f390'
(PID: 4692) using '*myhostname*'.
Operation not supported. Uknown error: 0x80040d10.
Do you want to continue anyway?
Same error occurres with Local IIS Web Server (IISExpress too...)
Solutions
In other forums / threads, various solutions have been mentioned, but none of them really fixed it.
Rebooting machine
Reinstalling VS
Terminating running web server instances
Has anyone else faced this annoying error?

Visual Studio 2012 hangs, when observing an Collection while debugging ASP.Net 3.5

for some time i've got a problem debugging my asp.net 3.5 Application with Visual Studio 2012. Each Time i want to observe which values are in an Collection,List or similar classes, Visual Studio hangs for some seconds and then for each Property of the Collection (like Count) there is no Value, but a message which says an timeout occured and i have to step further in the debugger, to activate it again. But when i step further (F10), Visual Studio hangs and i just can kill the w3wp.exe process and start debugging from beginning.
This Problem occurs only in my classic asp.net 3.5 application. Other Asp.net MVC or WinForms applications work just fine!
Anyone an idea?
I was also facing this issue and stumbled across this post:
Unable to start debugging on the web server. Could not start ASP.NET debugging VS 2010, II7, Win 7 x64
Dont know how but correcting the username/password of the app pool which was used by the ASP.NET application fixed the issue.
P.S: Application was working fine it not debugged with old app pool credentials.
Hope this helps!

Resources