Re: Controlling timeout, how?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Sami Vaaraniemi (samivanospam_at_pleasejippii.fi)
Date: 05/26/04

  • Next message: Søren M. Olesen: "Re: Controlling timeout, how?"
    Date: Wed, 26 May 2004 21:54:12 +0300
    
    

    Since this is an ASP.NET web application you probably did "Add Web
    Reference" in VS.NET, right? When you do this, VS.NET generates a web
    service proxy and adds it to your project. You can see the proxies under the
    Web References node in VS.NET Solution Explorer. When you want to call the
    web service, you call methods of this proxy class.

    The proxy class has methods specific to the particular web service, and also
    properties such as Url (the address of the web service) and Timeout. To set
    the timeout to 60 seconds (sorry this is C#):

        // instantiate web service proxy
        MyProxy proxy = new MyProxy();
        // set the timeout (in milliseconds)
        proxy.Timeout = 1000 * 60;
        // now the timeout is set, make the call
        proxy.MyWebMethod();

    Sami

    "Søren M. Olesen" <smolesen@hotmail.com> wrote in message
    news:%23VMcvz0QEHA.3944@tk2msftngp13.phx.gbl...
    > Sorry for asking, but how do I set the 'Timeout property of the web
    service
    > proxy' ??
    >
    > TIA
    >
    > Søren
    >
    >
    > "Sami Vaaraniemi" <samivanospam@pleasejippii.fi> wrote in message
    > news:ulEyJB0QEHA.3140@TK2MSFTNGP11.phx.gbl...
    > > "Søren M. Olesen" <smolesen@hotmail.com> wrote in message
    > > news:%239y9$tyQEHA.624@TK2MSFTNGP11.phx.gbl...
    > > > Hi
    > > >
    > > > I've been working on a web-site which calls a webservice.
    Unfortunatelu
    > > the
    > > > webservice has quite a bit of work to do, so my page timesout with the
    > > > following error:
    > > >
    > > >
    > > > The operation has timed-out.
    > > > Description: An unhandled exception occurred during the execution of
    the
    > > > current web request. Please review the stack trace for more
    information
    > > > about the error and where it originated in the code.
    > > >
    > > > Exception Details: System.Net.WebException: The operation has
    timed-out.
    > > >
    > > >
    > > > before the webservice is done.
    > > >
    > > > How do I control how long time there has to go, before I get a
    timeout??
    > > >
    > > > I've tried:
    > > >
    > > > Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
    > > > System.EventArgs) Handles MyBase.Load
    > > >
    > > > Server.ScriptTimeout = 500
    > > > ...
    > > > End Sub
    > > >
    > > > But it doesn't seem to make any difference.....
    > > >
    > > > TIA
    > >
    > > Assuming that the target web service is not timing out, there are still
    a
    > > number of places where you will need to define timeout values.
    > >
    > > First you need to set the Timeout property of the web service proxy. Set
    > it
    > > so that it is greater than the expected processing time. Then, set the
    web
    > > application execution timeout (<httpRuntime executionTimeout="xx"/> -
    this
    > > is the same as Server.ScriptTimeout) so that it is greater than the
    proxy
    > > timeout. Finally, you may also need to set the responseDeadlockInterval
    > > value (<processModel responseDeadlockInterval="xx" />).
    > >
    > > Regards,
    > > Sami
    > >
    > >
    >
    >


  • Next message: Søren M. Olesen: "Re: Controlling timeout, how?"

    Relevant Pages

    • RE: Setting web service timeout in vb.net
      ... you can directly set this "Timeout" property on the ... client-side proxy. ... that your webservice proxy class is derived from "SoapHttpClientProtocol": ... It gives no specific directions and I could not find a ...
      (microsoft.public.dotnet.languages.vb)
    • Re: Looking for Proxy that also monitors availability of a remote service
      ... > I'm in search of a proxy that gates access to a ... > remote web service and monitors the availability and response time of the ... > service so that client behind the proxy knows instantly that the service ... > processes on our side timeout and chew up sockets fruitlessly... ...
      (comp.security.firewalls)
    • Re: WebSvc Q
      ... Or perhaps I can retrieve the timeout value from webconfig ... > proxy is just an ordinary .cs source file and changing it is no different ... > constructor in the subclass that sets the timeout. ... > because of regenerated proxies. ...
      (microsoft.public.dotnet.framework.webservices)
    • Blank URL/timeout log entries in proxy.
      ... getting constant entries saying 'blank URL' and 'Timeout'. ... 12:55:34 PROXY: 1288 Timeout in transfer. ...
      (microsoft.public.security)
    • Re: Controlling timeout, how?
      ... but how do I set the 'Timeout property of the web service ... >> before the webservice is done. ... > First you need to set the Timeout property of the web service proxy. ...
      (microsoft.public.dotnet.framework.webservices)