Re: Controlling timeout, how?
From: Sami Vaaraniemi (samivanospam_at_pleasejippii.fi)
Date: 05/26/04
- Previous message: Luciano: "HELP! Consuming C# web services from VC++ 6 or eVC++ (using or not the PocketSOAP library)"
- In reply to: Søren M. Olesen: "Re: Controlling timeout, how?"
- Next in thread: Søren M. Olesen: "Re: Controlling timeout, how?"
- Reply: Søren M. Olesen: "Re: Controlling timeout, how?"
- Messages sorted by: [ date ] [ thread ]
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
> >
> >
>
>
- Previous message: Luciano: "HELP! Consuming C# web services from VC++ 6 or eVC++ (using or not the PocketSOAP library)"
- In reply to: Søren M. Olesen: "Re: Controlling timeout, how?"
- Next in thread: Søren M. Olesen: "Re: Controlling timeout, how?"
- Reply: Søren M. Olesen: "Re: Controlling timeout, how?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|