Hello all. I've noticed something curious when using a filesystem watcher and was wondering if anybody had experienced thesame thing. All of my web applications manage their sessionthrough SQL Server and an assembly I built that I published inthe GAC. It's a service component and runs as a ServerApplication in Component Services under a particular identityinstead of the identity of the application that is calling it. I use the object construction string to get my connection stringto my session database. When we use the Session componentthroughout our web apps and other things it works fine great. However, I set up a FileSystemWatcher and have experienced atotally different thing. In the file system watcher I have amethod that handles the fileCreated event fired when a new fileis added to my watch folder. The Event Handler creates asession in my Session database using the Session Assembly in theGAC. This is the same assembly used by ALL THE OTHERapplications that need session information. My FSW does this sothat I can use that session to track information on what the FSWis doing.
Now, in all the other applications, I usually get 1 to 5 databaseconnections to the SQL Server through the session component nomatter how many different applications are hitting theSession.dll. When the FSW fileCreated event fires, I add 4items to the session database using the same methods of theSession.dll that the other applications use. But when theSession assembly is called from the FSW, it creates a NEW SQLConnection every single time that I make the call toAddVariable! After about 5 min, I've got about 100 connectionsto my Session database and it's starts rejecting further calls. It acts as though there is no using a connection from a pool,but only to create a new one and THEN put it in a pool to neverbe used again. Has anyone got any experience with anything likethis?
--------------------------------
From: Clifford Tillman
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>5ZJ4/O+X2ECeCkRMWw0ENg==</Id>