views:

28

answers:

1

hi (excuse me about my english)

I'm a dotnet propgrammer. recently i wrote a client-server application that use system.net.sockets for connecting and use .net remoting for comunications. when number of client increased(e. up to 100) sometimes server application freezed and after several minuts comebacks. i use sql2005 with pooling and timeout. Plz Help Me!

A: 

Check whether you are disposing everything that is IDisposable in your data access code - connections, for example. So for example, if you are using a SqlConnection class, you would write code like so:

using (var connection = new SqlConnection(...))
{
    // code to do something with the connection
}

This would ensure that the .NET connection is closed, releasing the physical SQL Server connection to the pool. If you're not doing this, then the pool will run out of available connections until some of them start timing out and are closed automatically.

David M
thanks can u explain more please!
fakhrad
Have edited answer
David M
thanks yes! it's one of my problems!
fakhrad