Sai Kumar Koona
When are Application_Start() and Application_End() Used?
By Sai Kumar Koona in .NET on Aug 18 2018
  • Sai Kumar Koona
    Aug, 2018 18

    These two methods will declare in Global.asax file as shown belowpublic class WebApiApplication : System.Web.HttpApplication{protected void Application_Start(){//Any Initializations of resources before calling any functionality}protected void Application_End(){//Release of resources before unloading the application}}Application_Start() method is called when the first resource of the application is requested and it is called once for the application. There is no “user perspective” in this. Just load/create stuff needed for the application to function.Similarly, Application_End() method is called only once, before the application is unloaded. Use it to dispose of resources.

    • 2
  • Ketan Shinde
    Nov, 2018 21

    It is by default feature in Global.ascx file.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS