开发者

global.asax Events

开发者 https://www.devze.com 2023-01-31 10:02 出处:网络
This is a quick question really, I\'ve inherited a website that uses the Global.asax events Application_PostRequestHandlerExecute and Session_End to close database connectio开发者_StackOverflowns. But

This is a quick question really, I've inherited a website that uses the Global.asax events Application_PostRequestHandlerExecute and Session_End to close database connectio开发者_StackOverflowns. But i'm seeing a number of connections that appear to not be closing. If someone closes a page before it's finished loading would the Application_PostRequestHandlerExecute event fire?

I'm thinking this could be the cause of my open connections


If the application throws exceptions that are not handled, and connections are open at the point of exception, the connection can remain open.

Make sure the global error handler also closes these connections.

0

精彩评论

暂无评论...
验证码 换一张
取 消