Vortex852456
Vortex852456

Reputation: 739

Restart IIS after Stackoverflow Exception

Well, sometimes I don't think before I debug. And sometimes the results of this is a StackoverflowException.

When this happens, the application seems to hang. I go to IIS and stop the pool manully, but I can't start it then (message translated from german: "currently the service cannot accept commands").

Killing the process "w3p.exe" via task manager allows me to start the pool.

But the application still hangs: When I try to access the page via browser (code with stackoverflow exception already corrected) the page is loading endless/no reaction.

The only workaround I found out is to restart the whole computer. Is there another way to get the IIS pool running fine after an StackOverflowException?

Upvotes: 0

Views: 1011

Answers (1)

Vortex852456
Vortex852456

Reputation: 739

This solved my problem, thanks to @PeterB:

net stop aspnet_state
net start aspnet_state

On some systems the service is called "aspstate" instead of "aspnet_state".

Upvotes: 1

Related Questions