M
Matt MacDonald
Hi all,
I have an asp.net application that is going to be hit by a lot of users
and we want to minimize the # of database connection opens and closes.
Here's what I'm thinking I can do. I want to declare a connection object in
the global.asax file as public shared and open it once (in the
application_start method) and close it once (in the application_end) method.
On MSDN is claims that public shared connections are thread safe, so I'm
thinking this should work. If anyone knows one way or the other please let
me know and if there is a better way to do it please let me know that too.
I just don't want to deploy it this way and then find out in the middle of
the night that users are getting thrown off the site because the sessions
are clashing.
Thanks in advance,
Matt
I have an asp.net application that is going to be hit by a lot of users
and we want to minimize the # of database connection opens and closes.
Here's what I'm thinking I can do. I want to declare a connection object in
the global.asax file as public shared and open it once (in the
application_start method) and close it once (in the application_end) method.
On MSDN is claims that public shared connections are thread safe, so I'm
thinking this should work. If anyone knows one way or the other please let
me know and if there is a better way to do it please let me know that too.
I just don't want to deploy it this way and then find out in the middle of
the night that users are getting thrown off the site because the sessions
are clashing.
Thanks in advance,
Matt