You could use System.Security.Principal.WindowsIdentity.GetCurrent().Name to identify the Identity in which the current application is running. This link provides a nice utility which displays the identity under which the aspx is run.
I want to recycle the application pool through my application.
Previously I was storing the application pool name in my database and using that to recycle.
But It happened in the past that we moved apps from one app pool …
I'm trying to detect when an ASP.NET application is recycling due to either the web.config file being modified or the IIS application pool being manually recycled.
Initially I thought ASP.NET's Application_End method would work, and tried …