G
Guest
Hello, I am trying to understand when IHttpModule.Dispose method is called.
Is it called when the Application is disposed, or when the request ends?
If I want to make an object Application-wide and close it when the
application ends can I use that method or write something like this in the
class that implements the IHttpModule?
public void Init(HttpApplication application)
{
application.Disposed +=new EventHandler(application_Disposed);
}
private void application_Disposed(object sender, EventArgs e)
{
// close my object here
}
Thanks in advance.
Is it called when the Application is disposed, or when the request ends?
If I want to make an object Application-wide and close it when the
application ends can I use that method or write something like this in the
class that implements the IHttpModule?
public void Init(HttpApplication application)
{
application.Disposed +=new EventHandler(application_Disposed);
}
private void application_Disposed(object sender, EventArgs e)
{
// close my object here
}
Thanks in advance.