I have written an intranet site with about 8 pages. Each page creates a new class (contained in a class library), in the class a connection to SQL server is created.
The class also has a public sub as followswhich can be called from class instance on each page.VB Code:
Public Overridable Sub CloseConnection() If conConnect.State <> ConnectionState.Closed Then conConnect.Close() conConnect.Dispose() End Sub
The problem is after browsing each page once there are a list of 11 connections (Enterprise Manager > server > Management > Current Activity > Process Info) for .Net SqlClient Data Provider (application column) and I have to kill them.
Is there some way of ensuring connections get closed. We have 800ish staff and that is a lot of connections.




Reply With Quote