Home All Groups Group Topic Archive Search About

WebRequest timeout changed declaratively

Author
8 Jan 2007 10:57 PM
Cedric
Hi all,

We have some performance issues on a .NET 2.0 app. However we cannot modify
it, we don't have the sources.
Reading the logs, the error is a timeout happening in some Web Service call.

With the sources, it would be easy (?!), would have just changed
WebRequest.Timout to a bigger value, but we don't have sources.

Is there a way to change the default value, which is 100 seconds,
declaratively (in web.config, machine.config... etc.) or even somewhere else
like in the registry? Or is it hard coded in the framework?

I have been struggling on this, but haven't found a lead...

Thanks,

Cédric

Author
9 Jan 2007 10:23 AM
Jakob Christensen
You can set executionTimeout for the HttpRuntime element in web.config:
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx

HTH, Jakob.
Show quote
"Cedric" wrote:

> Hi all,
>
> We have some performance issues on a .NET 2.0 app. However we cannot modify
> it, we don't have the sources.
> Reading the logs, the error is a timeout happening in some Web Service call.
>
> With the sources, it would be easy (?!), would have just changed
> WebRequest.Timout to a bigger value, but we don't have sources.
>
> Is there a way to change the default value, which is 100 seconds,
> declaratively (in web.config, machine.config... etc.) or even somewhere else
> like in the registry? Or is it hard coded in the framework?
>
> I have been struggling on this, but haven't found a lead...
>
> Thanks,
>
> Cédric
>
>
Author
9 Jan 2007 8:49 PM
Cedric
Hi Jakob,

Thanks a lot for your answer.
exectutionTimeout will set the time the web server allows for a task to
execute (processed by the w3wp.exe process potentially).
The timeout I would like to set is on the client side. The client calls the
web service and as the answer from the server is too long to come, it comes
to the timeout. This timeout is handled through the WebRequest.Timout or
HttpWebClientProtocol.Timeout.

So it would be this property's default value that I would need to set
without modifying the code...

Any idea?

Thanks,

Cédric


Show quote
"Jakob Christensen" <JakobChristen***@discussions.microsoft.com> wrote in
message news:47C26E7B-83AF-4D84-80E0-0AA6A850D2D8@microsoft.com...
> You can set executionTimeout for the HttpRuntime element in web.config:
> http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
>
> HTH, Jakob.
> --
> http://www.dotninjas.dk
>
>
>
> "Cedric" wrote:
>
>> Hi all,
>>
>> We have some performance issues on a .NET 2.0 app. However we cannot
>> modify
>> it, we don't have the sources.
>> Reading the logs, the error is a timeout happening in some Web Service
>> call.
>>
>> With the sources, it would be easy (?!), would have just changed
>> WebRequest.Timout to a bigger value, but we don't have sources.
>>
>> Is there a way to change the default value, which is 100 seconds,
>> declaratively (in web.config, machine.config... etc.) or even somewhere
>> else
>> like in the registry? Or is it hard coded in the framework?
>>
>> I have been struggling on this, but haven't found a lead...
>>
>> Thanks,
>>
>> Cédric
>>
>>
Author
10 Jan 2007 8:45 AM
Jakob Christensen
Hi Cédric,

Sorry, I misunderstood your question :-)

AFAIK, the only way to change the client timeout is by setting the Timeout
property of the client-proxy programmatically.  So I am out of ideas :-(

Kind regards, Jakob.

Show quote
"Cedric" wrote:

> Hi Jakob,
>
> Thanks a lot for your answer.
> exectutionTimeout will set the time the web server allows for a task to
> execute (processed by the w3wp.exe process potentially).
> The timeout I would like to set is on the client side. The client calls the
> web service and as the answer from the server is too long to come, it comes
> to the timeout. This timeout is handled through the WebRequest.Timout or
> HttpWebClientProtocol.Timeout.
>
> So it would be this property's default value that I would need to set
> without modifying the code...
>
> Any idea?
>
> Thanks,
>
> Cédric
>
>
> "Jakob Christensen" <JakobChristen***@discussions.microsoft.com> wrote in
> message news:47C26E7B-83AF-4D84-80E0-0AA6A850D2D8@microsoft.com...
> > You can set executionTimeout for the HttpRuntime element in web.config:
> > http://msdn2.microsoft.com/en-us/library/e1f13641.aspx
> >
> > HTH, Jakob.
> > --
> > http://www.dotninjas.dk
> >
> >
> >
> > "Cedric" wrote:
> >
> >> Hi all,
> >>
> >> We have some performance issues on a .NET 2.0 app. However we cannot
> >> modify
> >> it, we don't have the sources.
> >> Reading the logs, the error is a timeout happening in some Web Service
> >> call.
> >>
> >> With the sources, it would be easy (?!), would have just changed
> >> WebRequest.Timout to a bigger value, but we don't have sources.
> >>
> >> Is there a way to change the default value, which is 100 seconds,
> >> declaratively (in web.config, machine.config... etc.) or even somewhere
> >> else
> >> like in the registry? Or is it hard coded in the framework?
> >>
> >> I have been struggling on this, but haven't found a lead...
> >>
> >> Thanks,
> >>
> >> Cédric
> >>
> >>
>
>

AddThis Social Bookmark Button