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
- Create an IIS web request activity light
- Writing/Overwriting to specific XML file from ASP.NET code behind
- What is the point of definnig Asp.net Intrinsic Objects In different places and what is the different betwen them?
- Deleting Orphans with Fluent NHibernate
- IOrderedEnumerable to vb.net IOrderedEnumerable Conversion
- Entity Framework Code First with Fluent API Concurrency `DbUpdateConcurrencyException` Not Raising
- Getting deeply embedded XML element values
- What is best way to check if any of the property of object is null or empty?
- NuGet - Given a type name or a DLL, how can I find the NuGet package?
- ASP-MVC Code-first migrations checkbox not active
- How do i add onclient click to my jquery button
- Jquery: Change contents of <select> tag dynamically
- Retrieving data from Oracle database
- ASP.NET: Fill Textbox field upon dropdownlist selection by user
- Why web API return 404 when deploy to IIS
Related Questions in IIS
- Create an IIS web request activity light
- Why web API return 404 when deploy to IIS
- Adding site Binding programmatically IIS 7.5
- .net Web Api 2 Owin authentication token expires suddenly and often on IIS 8.5
- Redirecting subdomain to directory on Azure
- Saving Image To a Temp Folder is Loosing Session
- The page cannot be displayed because an internal server error has occurred on server
- Approach for performing long running tasks in .NET
- Why does IIS Anonymous Authentication turn on by itself after I publish my project to server?
- IIS 7 ERR_CONNECTION_TIMED_OUT only with public IP
- Maximum value for IIS .NET Compilation Batch Time-out
- ASP.Net 1.1 app on IIS 7 waiting threads
- File upload web api 2.0 error after deployment on IIS 8.5
- nginx and IIS - dealing with invalid hostname and SSL
- Allow console application to access Windows Authenticated web app
Related Questions in GLOBAL-ASAX
- Skip login on MVC 3 application (SSO)
- IIS and Windows authentication not allowing error pages
- Global.asax template not available in Visual Studio 2008
- How to access the session declared in Session_Start in Global.asax file in another class file in asp.net
- How to solve a same site and multiple projects of global.asax file
- Binding bin as a virtual directory in IIS creates global.asax error
- How to catch all php file requests in asp.net routes
- Redirected you too many times error
- Check for cookie or session before granting access to a file in asp.net web application
- How to create controller object and execute action with parameter from global.asax
- Is there a bug with this design?
- Customised error messages are not translated in ASP.NET MVC 4
- 301 Redirect dynamic urls from database in asp.net
- Variables that are given values in Global.asax sometimes return wrong values
- Ef global asax open db connection
Related Questions in LIFECYCLE
- Swift ios viewDidLoad or viewDidAppear
- Android app lifecycle engine library
- android numberpicker index outofbounds rotation
- How does different phases of JSF lifecycle behave in a stateless view containing a form
- Lifecycle of Android Services differs between phones
- Why angular2 executes methods several times?
- ios app life cycle when waking up from significant location change or iBeacon monitoring?
- Angular $rootScope $on listeners in 'destroyed' controller keep running
- Angular2 - ngOnChanges value in OnInit - Directives
- page display when reloading in ASP.NET
- How to restore activity from where it was left by pressing back button?
- Angular 2 Parent afterViewInit fired before Child afterViewInit
- TabActivity lifecycle callback in disorder?
- DataContext accessed after Dispose in render pages/controls
- Failed to copy artifact or file with maven packaging a web application
Related Questions in APPLICATION-END
- How to exit an ASP.NET application gracefully when stopping debugging in VS 2010?
- The Application_end method in my ASP.NET MVC website is called many times weirdly almost at the same time
- Regarding Session_End and Application_End methods in asp.net
- implementation of customized application_end method in asp.net
- Prevent IIS from unloading ASP.Net site
- Asp.net Application_End Timeout
- Application_End() cannot access cache through HttpContext.Current.Cache[key]
- background thread in asp.net application
- When Application_End isn't called in asp.net WebService
- IIS app pool recycling randomly every few seconds
- Why would IIS "start" an App that is still running?
- How to get Application_End to run while debugging (or when stopping debugging)?
- Open or create a text file every day on Application_Start and Append with requested web pages then close on Application_End
- Application_End() event is fired without any call in global.ascx
- trying to identify source of bin dir change or directory rename app restart
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.