Prevent Visual Studio 2012 to stop my website when start debugging - asp.net

I have an ASP.NET MVC 4.0 web project. I am caching state in the application cache using the Ninject InSingletonScope.
Every time I start Visual Studio 2012 debugging (F5), it kills my web app and my app cache also.
Note that I use IIS and not IIS Express, and I don't use Edit and Continue (see Visual studio debugger, dont stop website on stop debugging)
How can I prevent VS to stop my website every time ?

Instead of pressing F5, try going to the menu: Debug -> Attach To Process and attach to w3wp.exe for the website that is hosted on IIS.

Related

Visual Studio 2017 throws error on debugging an ASP.NET MVC application

I am setting up my new workstation (Windows 10 Pro) with my ASP.NET projects with Visual Studio 2017. I have enabled local IIS and the project throws a timeout error while trying to debug the project.
It is not failing 100% of the time though, mostly fails but when it runs it is taking longer than expected to give the startup page. The error thrown is
Unable to start debugging on the web server. The operation has timed out
I did notice that the IIS worker process (w3wp.exe) was only executed in the completed console output. So it looks like the IIS worker process is not always being executed.
Any help would be appreciated!
Thank you!
The project runs successfully on an old workstation (Windows 10 Edu) with Visual Studio 2017. App pool settings has been compared between both and it seems same. IIS reset is tried as well. Visual studio has been repaired and IIS local has been restarted as well (unchecking and enabling followed by restarting the machine). Default app pool is used and its been recycled as well. Nothing worked!
Possibly the Visual Studio project version does not match the ASP.NET configured application pool. Update the ASP.NET version in the application pool and restart it.
Make sure you have the correct version of ASP.NET installed on IIS. A version mismatch between ASP.NET in IIS and the Visual Studio project can cause this issue. May need to set the framework version in web.config. To install ASP.NET on IIS, use the Web Platform Installer (WebPI).
If the issue is not related to IIS configuration, try the following steps:
Restart Visual Studio with administrator privileges and try again.
For example, using the Web to deploy some ASP.NET debugging scenarios that require elevated Visual Studio privileges.
If you are running multiple instances of Visual Studio, reopen your project in one instance of Visual Studio (with administrator privileges) and try again.
If using a HOSTS file with a local address, try using the loopback address instead of the computer's IP address.
If not using a local address, make sure the HOSTS file contains the same project URL as in the project properties, Properties > Web > Server or Properties > Debug, depending on the project type.
Reference link:
Visual Studio "Unable to start debugging on the web server. The web server did not respond in a timely manner.".

Debugger not started in the VS2008

I have developed web application in .NET framework 3.5 in VS 2008, hosted in IIS under application pool ASP.NET 4.0 Integrated pipeline mode.
When I start debugging by hitting F5 button, it throws the error and debugger is not started.
But, If I open the same application in VS2010 and VS2013 and start debugging, the debugger started successfully.
If I browse the application's URL in the IE, it runs successfully. My problem is debugger not started in the VS2008.
What are the settings to be checked/changed to get working?
I have fixed by enabling the windows authentication for the respective website in IIS.
Refrrence:
1) http://blogs.iis.net/brian-murphy-booth/visual-studio-2008-unable-to-debug-asp-net-app-on-iis-7-0
2) http://forums.iis.net/t/1165570.aspx

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!

Attach to Process is not working in Visual studio 2008 in Windows 7

Today i had a wired issues with Visual Studio 2008 SP1 running in Windows 7 32bit Machine with IIS7 installed.
I am developing a web application. I have set up the default website in local host in IIS (IIS 7.0) to run the website and it is working fine when i press F5,the process runs and show break point locations. But when I try to debug the site by selecting attach to process from debug menu and select the browser process (IE8 or Mozilla), nothing happens and the process doesn't hit the break point. What am I doing wrong?
Thanks in advance for the help.
You should attach to the IIS worker process (w3wp.exe).
Check you have build the process in debug mode and pdb files are deployed with dll's.
Go to Project Properties > Build Tab > Click Advanced button >Now Set Debug Info to "Full".
In the Web.config file, change the line that reads
<compilation debug="false"/> to <compilation debug="true"/>.
How to: Attach to a Running Process, VS Express Edition does not allow attaching a process for debugging

Visual Studio 2010 (Ultimate): ASP.NET Web Service - Debug Breakpoint does not hit. Not able to Debug

Recently, I've installed VS 2010 on my machine. I also have VS 2008 installed.
Problem I'm facing is - I'm not able to debug the web services hosted on local IIS. Also, VS 2010 do not show message that source code is different.
To start debugging I'm attaching aspnet_wp.exe process. My breakpoint is in a method which is part of a Class Library project which is targeting to .NET v3.5.
Environment Details:
- Windows XP SP3
- VS 2005, 2008 & 2010
- IIS (v5.1) Targeting ASP.NET 2.0
- Web Service Targeting .NET Framework - v3.5
Does anybody have encountered same problem?
First there is an easiest method than attaching, to use the
System.Diagnostics.Debugger.Launch();
Next, go to the IIS and open the properties on you running web and check on "Web Site" tab if the the "HTTP Keep-Alives" is enable or not, and make it not enable.
If still not break, close the vs, and go to the project directory, and delete (first backup it) the xxxxx.suo file of the project. Then start it again and go for debug.

Resources