I tried this in the web forum to no avail, so I'll try here. I'm trying to write a test application to test my web services. The logical method is to add a web reference to get the proxy generated, and then create and call the proxy. This part is trivial.
By default, .NET uses Connection Groups for the socket connections used by the proxy to talk to the server. As an example, assume that my test application will make 100 web service method calls one at a time (no multiple calls in parallel). These calls will all use the same socket. Under most conditions, this would be a sensible thing to do. However, it doesn't necessarily mirror real life in that my clients will likely not be issuing 100 transactions on the same socket. This is true whether I use the same proxy object instance for all 100 calls, or a new instance for each call. So, I started looking at how to tell .NET to use a new socket on each request. If I set the ConnectionGroupName property to a unique value with every call, then a new socket gets opened for each call. However, the sockets don't get closed and I end up with 100 open sockets by the end of my test. This isn't what I want, either. How do I force .NET to give me the behavior I want? You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.