Re: Calling web services from .NET
- From: "Scott Baierl" <scott.baierl@xxxxxxxxxxxx>
- Date: Fri, 21 Jul 2006 11:48:34 -0700
That sets the amount of time that a webservice call waits for the completion
of a synchronous webservice call. That's not what I need. What I need is a
way to control how long the underlying TCP connection is cached or kept open
after the call has completed.
<CaffieneRush@xxxxxxxxx> wrote in message
news:1153396630.358920.135670@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
You can set the Timeout property on the web service proxy instance
before you make a call to the web method.
Dim ws As WebServiceA
ws.Timeout = 10 * 1000 * 60 '10 minutes
Dim myResult As Integer
Try
myResult = ws.GetMyResult()
'Do something with myResult
Catch wex As WebException
'Check and handle the web exception
End Try
The web service client will now wait 10 minutes before timing out.
If you want the client to wait indefinitely (maybe for debugging) then
set the Timeout to -1
HTH
Andy
Scott Baierl wrote:
I have an ASP.NET application that calls web services on another host.
Is
there a way that you can control the lifetime of the underlying TCP
connections that .NET uses to make the web service calls? From what I
understand, by default, .NET is configured to use a maximum of two
connections, and those connections stay open for up to 100 seconds after
the
last data was sent/received. Is there a way to control the lifetime of
those underlying connections? In other words, can I have .NET use a
different connection for each request, or, time out the existing
connection
quickly, so that it needs to create a new connection more often than the
100
second default timeout? Thanks in advance.
.
- References:
- Calling web services from .NET
- From: Scott Baierl
- Re: Calling web services from .NET
- From: CaffieneRush@xxxxxxxxx
- Calling web services from .NET
- Prev by Date: Re: Calling web services from .NET
- Next by Date: calling web services method in asp.net page throws error
- Previous by thread: Re: Calling web services from .NET
- Next by thread: Re: Calling web services from .NET
- Index(es):
Relevant Pages
|