Can anybody tell me when Application_End is triggered in a lifecycle of an application? When all sessions are ended, will Application_End be triggered automatically? + Are there any other reasons why Application_End could be triggered?
Application_End global.asax
56.2k views Asked by Lieven Cardoen At
3
There are 3 answers
2
Eric Rosenberger
On
Application_End is triggered when the ASP.NET worker process terminates. This usually occurs after a configurable period of inactivity or when IIS (or the relevant application pool) is shut down or restarted.
When running in IIS 6.0, the inactivity timeout is configurable through the application pool settings in Internet Services Manager (Idle Timeout on the Performance tab). Under earlier versions of IIS it can be set in machine.config (idleTimeout under processModel).
Related Questions in ASP.NET
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- IIS Rewrite Module exclude bots but allow GoogleBot
- Angular 16 sending null values to API
- I am the domain admin, newbie, how do I connect youtube.com on my domain?
- Dropdown list showing SQLServer2005SQLBrowserUser$DONSERVER instead of Active Directory group name in ASP.NET MVC C#
- ASP.NET Identity, Losing Ability to Login until Application Pool Recycles
- How to unprotect ASP.NET FormAuthentication cookie
- How does it work using ASP.NET FormAuthentication
- What is the purpose of a completely standalone 'this'?
- Is there a way to read .csproj PropertyGroup variable in c#
- MSBuild trying to copy different dll with similar name into project sporadically
- Minimizing IdentityServer4 Round Trips in Microservice Architecture with Ocelot
- Azure AD guest account in web app authentication user claims data
- Receiving 400 bad request on post when customer auth handler is used
Related Questions in IIS
- error 500 on IIS FastCGI but no clue despite multiple error loggings activated
- IIS Rewrite Module exclude bots but allow GoogleBot
- How to deploy angular 17 SSR into IIS
- IIS web site with httpplatformhandler on specific route does not redirect to the nextjs site
- Why is 'EDITBIN /STACK:2097152 w3wp.exe' cmd is giving me an LNK1342 error?
- Primeng Angular styles on subdomain don't work
- Apps migrated from IIS server1 to another IIS server2 stopped communicating with an App on IIS server 1 via SSL (HTTPS)
- How to authenticate with REST API service on IIS using pass-through authentication in Python?
- ASP.NET Core 8 is missing from application pool selection after install
- Azure Application Gateway ByPass
- SSL certificate is installed on iis and website but in browser is unknown
- Redirect to another site but show the original URL in browser
- Problem in hosting React App with react-router-dom on IIS Server
- Django Channels on IIS
- ASP.NET Core/Angular17 application files does not load when published in IIS
Related Questions in GLOBAL-ASAX
- asp.net c# webpage transforming url redirecting issue
- How do I implement Rate Limiting for app with webforms in .net framework
- Javascript/MVC: Global.asax updates variable, not updated in javascript
- Is it possible to load Saml2AuthenticationModule inside global.asax instead of web.config
- How to use Serilog in WCF with Autofac?
- How to set up Serilog in WCF?
- VB.Net webforms App: Hangfire background jobs library "Unable to cast object" error at startup
- Something is seriously wrong with my ASP.NET MVC
- Server.GetLastError() returns null when Internal Server Error (500) occurs
- C# Webapplication: Why is session usercount (in global.Session_Start) different from hub usercount (in hub OnConnected)
- How do I set language once the client application signed in with identity server
- How to Access Public Properties from Global.asax
- asp net global asax rewrite infinite loop
- ASP.NET site for redirecting many URLs fails 404 when redirecting URLs with stems
- Get Response Content Length in Global.asax Application_EndRequest function?
Related Questions in LIFECYCLE
- How to detect the Minimization of Custom Chrome Tabs on Android?
- Why my delete animation not play before delete
- TypeScript Unexpected token, A constructor, method, accessor or property was expected. Error in IDE
- Why does animation auto stop while onPause
- Spring Boot, deferring Readiness.ACCEPTING_TRAFFIC event?
- lifecycleNotificationUrl endpoint not being called/triggerred from Microsoft's Graph Api when Subscription is about to Expire
- Qt HTTP GET request works, but POST doensn't
- AfterViewChecked behaves differently in Chrome and Firefox
- Blazor: Is it possible to trigger OnParametersSet method for a specific parameter?
- How properly unmount state within ComponentWillUnmount to avoid memory leaks?
- OpenLiberty readiness probe implementation
- viewmodel dependencies not working in android studio
- Are useMemo and useEffect callback good places to run code only at the birth and death of a React component?
- androidx.lifecycle.Transformations not imported
- How to Detect System Shutdown in WPF App's OnExit Method?
Related Questions in APPLICATION-END
- The Application_end method in my ASP.NET MVC website is called many times weirdly almost at the same time
- How to get Application_End to run while debugging (or when stopping debugging)?
- How to recognize that Session_OnEnd event raises because of Application end in MVC Application
- Asp.net Application_End Timeout
- Loss of session and application ended randomly?
- I would like to use Application_End and Application_Error for logging, but have no global.asax file?
- trying to identify source of bin dir change or directory rename app restart
- Open or create a text file every day on Application_Start and Append with requested web pages then close on Application_End
- When Application_End isn't called in asp.net WebService
- background thread in asp.net application
- Server.MapPath inside Application_End handler in Global.asax
- How do I add a Application_End handler without using global.asax?
- How to exit an ASP.NET application gracefully when stopping debugging in VS 2010?
- Application_End() event is fired without any call in global.ascx
- Prevent IIS from unloading ASP.Net site
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)

The
application_endevent primarily fires when the IIS pool is recycled or the application itself is unloaded. One other thing to note, that a change to a dependent file (say web.config) will cause the application to reload itself, which will in cause the application_end event to fire while it is closing itself off.To note, the only instance I found of the application end event firing when the last user session times out is in some old documentation dated 2001. I'm not sure if that criteria still applies.