Re: Calling web services from .NET

Tech-Archive recommends: Fix windows errors by optimizing your registry



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.



.



Relevant Pages

  • Re: Where to store the handle for a web service?
    ... | Subject: Re: Where to store the handle for a web service? ... Are you calling an remote asp.net webservice in your certain asp.net ... Does he webservice you mentioned means the client proxy instance ... |> model since the underlying http connection to the server between client ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Where to store the handle for a web service?
    ... have convinced my client to use memory session state for now so for now I ... Are you calling an remote asp.net webservice in your certain asp.net ... > which connection our webservice client proxy will use (or manually create ... The question now is how to store the handle of the web service ...
    (microsoft.public.dotnet.framework.aspnet)
  • Strange webservice problem
    ... part of the process uses a simple web service, ... a few moments later the GPRS connection is re-established by something. ... what causes a webservice to re-establish a connection? ... being created and used within a separate thread, ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: Where to store the handle for a web service?
    ... Regarding on the webservice handle persist question, ... the ASP.NET Webservice's client proxy class is a ... which connection our webservice client proxy will use (or manually create ... The question now is how to store the handle of the web service ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Urgent, Professionals please help: How to call webservice stably from Pocket PC ???
    ... client and server or by the client or the server. ... If you server simply closes that connection without ... to call the webservice again, ...
    (microsoft.public.dotnet.framework.compactframework)