Application_EndRequest triggered before request end?

ERROLIREERS

New Member
I have some simple classes that need to be disposed a the end of the request.For that end I call the \[code\]Dispose\[/code\] method on those objects from the \[code\]Application_EndRequest\[/code\] event in \[code\]Global.asax\[/code\].This "works fine on my machine" but causes some problems on my production server where I get \[code\]Cannot access a disposed object.\[/code\] This happens in some MVC helpers.It seemed to me like Application_EndRequest is triggered at the end of the request. Is this not the case? Is there another event I should be using to dispose my objects?
 
Back
Top