Debugging kills Apppool - asp.net

I have an application which worked fine until yesterday.
Today I cannot run the application using F5. I receive an error "Unable to start ASP.NET Debugging".
When this message appears, the app-pool is stopped. No matter how often I restart the app-pool, debugging stops it again.
I DID NOT change one line of code. But what I did was changing my windows-(domain-user)password.
I already rebooted.
Any clue? Any logfile where I might look at?

Is the application pool running as your domain account? Did you update the password in the application pool as well?
Have you checked the Event Viewer to see why the application pool isn't starting?

Related

Automatic IIS reset when we have a 503 error

My website written with asp.net gives 503 error several times a week for unknown reasons and my website users suddenly encounter this error, we are investigating the reasons, but before that we are looking for a solution to The dedicated IIS section can be restarted automatically, is there a solution in this regard?
The goal is to do this reset automatically before users want to let us know that the website has encountered an error
Thanks a lot
The 503 error is probably a problem with the app pool, the app pool suddenly stops or the process is killed. If you can be sure there is no problem with the app pool, you can just restart the application pool without restarting IIS.
If you want to restart IIS, you can use Task scheduler.
Open task scheduler in Control panel, create basic task wizard in right-hand action.
Enter a name and next.
Choose the trigger and next.
Choose start a program and next.
Choose iisreset.exe and next.
Finish.

why I can run my asp.net site on local iis?

I have local iis7 on my machine. there are two application running on it: web service and asp.net site.
until yesterday it had worked perfectly, but today suddenly when I run it I get this error:
unable to start debugging on the web server.
the underlying connection was closed: an unexpected error occurred on a send.
click help for more information.
when I build it I don't see any problem.
what can be the problem?
See the "Tray Icons".....and
Right click on the webserver Icon->exit/close....
then run your application or
Or
restart your computer.....causes your IIS will restart...
More Information :
http://support.microsoft.com/kb/915599
Tray area in desktap

Visual Studio 2013 debug session stops 1 minute after logging in with AspNet Identity

Maybe the answer is trivial, but I couldn't find the exact same behavior in other threads.
I have an MVC 5 web application. I implemented custom identity database with Asp.Net Identity 2 (Owin). I have only external login (facebook, google...etc). The login works fine. The users got authenticated with roles and everything.
After one minute of inactivity, my Visual Studio 2013 debug session stops. Sometimes the application remains available (so IIS App Pool is not stopped) sometimes it recycles IIS as well.
I also implemented logging in Application_End Global.asax method in order to have the shutdown reason, but in these cases there is no info in the logs. In other cases, when the App pool is recycled due to web.config change I do have info in the logs.
I suspect timeout, however I have no clue what kind of timeout it could be. Where should I look?
Thanks in advance.
I ran into the same problem, and found out how to set the timeout for IIS Express:
On the command window, navigate to the folder where IIS Express is installed, and execute the following appcmd command:
c:\Program Files (x86)\IIS Express> appcmd set config /section:applicationPools /[name='Clr4IntegratedAppPool'].processModel.idleTimeout:0.00:00:00
(scroll right to see the whole line)
Open IIS, find your application's AppPool, then:
Right click on the app pool and select Advanced Settings
Under "Process Model" set Idle Time-Out (minutes) to 0.
For reference, the only non-default (non-bold) settings in my "Process Model" and "Recycling" section are:
Identity : NetworkService
Idle Time-out (minutes) : 0
Ping Enabled : False
And with these settings, I can start up the debugger and it never seems to automatically time out or recycle.
Daniel I have had this exact same issue for a few months now and was about to go crazy about it. But I stumbled on a suggestion to run visual studio as administrator and that seems to have worked.

While Debugging IIS from VS2008 Website Is Unresponsive

I have a web app running in a local instance of IIS 7.5. My app pool has it Maximum Worker PROCESSES at 3. When I go to Vs2008 and attach my debugger to my local IIS I see three w3wp.exe processes as expected. I attach to all three. When I run a web page my breakpoint hits in my code behind, as expected.
Here's the problem: in my code behind my C# code is calling a service on another computer that in turn sends a request back to my local IIS box. This is all synchronous. The problem is that while I'm in the debugger it seems like that remote code's call to my IIS box is immediately failing. If I go on to that remote box while I'm debugging and try to pull up any URL from my local box it hangs. And, as soon as I hit F5 in VS2008 the browser frees up and fulfills the request.
So why does the VS2008 debugger cause IIS to not use any of the other worker processes to service other incomming requests?
Thanks for any ideas.
While you debugging any process - all the threads hangs.
So what you're describing is expected behavior. You're debugging a thread in IIS, the whole process hangs until you press F5 and return the control to the process.

Application Pools not starting after iisreset

Before I start, I know using iisreset is considered bad practice, but this shouldn't happen anyway..
What we have:
Several machines with IIS6 on Windows Server 2003 R2 (both 64 and 32 bits)
Several WCF webservices (.NET runtime 2.0) deployed in several applications, each with it's own application pool, each application pool running under an other windows account.
What happens:
All appPools are started, all services operational
IISReset is executed (or the machine is rebooted)
IIS comes back up, but not all application pools start properly. Sometimes they all come back up, sometimes one or more pools won't start. They can be started manually however.
Is this "normal" iis behavior and should I just avoid using iisreset, or are we doing something wrong in our .NET code?
The application pools should restart on an iisreset, but they do run outside of iis (in COM+) for reliability. This mean they may may not come back if the application is misbehaving, but IIS and the other apps will(should) come back. So yes, This is "normal".
P.S.
I would also like to "OUT" myself as a proud user of iisreset. Bad practice? Bah! ;D
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When you say "not started", does it mean you attempt to access some WCF web services (after iisreset), and you get a Service Unavailable error because the appPool cannot be started? Do you see any IIS W3SVC related entries in the Event logs?
If there are, they may be able to clue you in why they cannot start; post them up here.
Reason:
IIS does not immediately start ASP.NET worker processes (w3wp.exe) until the first request comes in. When it says "not started" it mean you attempt to access some WCF web services (after iisreset) failed due to object was holding some space in memory, and you get a Service Unavailable error because the appPool cannot be started.
Workaround:
Create Batch file with following commands & schedule it.
net stop 23svc
net stop msftpsvc
net stop smtpsvc
net stop PleskControlPanel
net stop HTTPFilter
iisreset /restart
net start w3svc
net start msftpsvc
net start smtpsvc
net start PleskControlPanel
net Start HTTPFilter
Had similiar issue - after IIS has been restarted, DefaultAppPool was stopped.
In application event logs found an error:
Windows cannot log you on because your profile cannot be loaded. Check that you are connected to the network, or that your network is functioning correctly. If this problem persists, contact your network administrator.
DETAIL - Access is denied.
Fixed by setting in DefaultAppPool Advanced Settings option Load User Profile to False.
Hope it could be usefull.
In a prior support role, I managed several IIS servers running all kinds of .NET mess. When an AppPool failed to start, it was usually a bad login credential.
Re-setting the identity (auth credentials) via advanced settings of the Application pool worked for me.
Earlier I changed my active directory password and as the app pool was already running, it worked fine until I performed IISRESET.

Resources