Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2005

Tip: Looking for answers? Try searching our database.

Closing TCP Conections with multi-threaded web service calls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Rossitter - 10 Oct 2005 15:11 GMT
Hi Everyone,

I have a windows service which consumes a web service on a separate machine
in our network. I modified my machine.config to allow my service application
to make 200 connections to the server at once, and I spool up to 200 threads
at once to make calls to the server. All of this works great and as expected.

However I have noticed that by default the underlying connections tend to
stay open for about 90 seconds after my web service calls terminate. So if I
use a tool like TCPView I can see that I still have hundreds of connections
that remain open even after explicitly calling the .Dispose() method of my
proxy objects.

Is there a way that I can force those connections to close from my Service?
Or is that controlled by the server?

Thanks a Million.

John Rossitter
Durgaprasad Gorti - 10 Oct 2005 16:03 GMT
John,
Internally we pool the connections. These connections stay open for the
duration of MaxIdleTime. You can set that through the ServicePoint or
ServicePointManager.
For example

Request.FindServicePoint().MaxIdleTime = 3000; //3 seconds

In furture please post these Netwokring Questions to
http://forums.microsoft.com/msdn/ShowForum.aspx?ForumID=40

Thanks

> Hi Everyone,
>
[quoted text clipped - 15 lines]
>
> John Rossitter
John Rossitter - 10 Oct 2005 17:19 GMT
Hi Durgaprasad,

As you requested I re-posed my question on the form.
I did not understand 100% what you meant by Request in your example but you
can read what I tried at
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=106172

Thanks for the help,

John Rossitter

> John,
> Internally we pool the connections. These connections stay open for the
[quoted text clipped - 28 lines]
> >
> > John Rossitter

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.