HighTechTalks DotNet Forums  

setting a timeout when consuming a WS

ASP.net Web Services microsoft.public.dotnet.framework.aspnet.webservices


Discuss setting a timeout when consuming a WS in the ASP.net Web Services forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
GaryDean
 
Posts: n/a

Default setting a timeout when consuming a WS - 04-27-2007 , 08:40 PM






how can I deal with a web service that my not respond or my respond beyond
my, say 30 second, tollerance?
thanks
Gary




Reply With Quote
  #2  
Old   
Manish Bafna
 
Posts: n/a

Default RE: setting a timeout when consuming a WS - 04-28-2007 , 11:58 PM






Hi,
i would suggest instaed of increasing time-out you should try to figure
what is causing time-out.If it is database levek that is causing time-out
then try to optimize the query by using appropriate index,returning fewer
records etc.All said and still it is causing time-out then there are five
places where you can increase time-out:
[1]In the connection string you can add connection time out(in seconds)
[2]You can set command time out for command object
[3]You can set timeout property of proxy class of web service.
webservice1 ws = new webservice1;
ws.Timeout = 90000;//in millisecods
[4]You can set executionTimeout in web.config of webservice project
<executionTimeout="90"/>//in seconds
[5]You can set executionTimeout in web.config of ASP.NET Client Application
or app.config of windows client application(that is web service consumer)
<executionTimeout="90"/>//in seconds
You need to figure out increasing time-out in which one of these will solve
your problem
--
If my answer helped you,then please do press Yes below.
Thanks and Regards.
Manish Bafna.
MCP and MCTS.



"GaryDean" wrote:

Quote:
how can I deal with a web service that my not respond or my respond beyond
my, say 30 second, tollerance?
thanks
Gary





Reply With Quote
  #3  
Old   
Steven Cheng[MSFT]
 
Posts: n/a

Default RE: setting a timeout when consuming a WS - 04-30-2007 , 01:56 AM



Hi Gary,

As Manish suggested, you can first check the service to measure an expected
and reasonable timeout period. For configuration ASP.NET webservice time,
there have two settings:

1. For server-side timeout, you can adjust the "executionTimeout" through
the <httpRuntime> element in web.config file.

#httpRuntime Element (ASP.NET Settings Schema)
http://msdn2.microsoft.com/en-us/library/e1f13641.aspx

BTW, you'd better use "release" mode since this setting is not used when
you use debugging mode at development time.

2.For client webservice proxy, you can also set the "Timeout" on it so as
to control the blocking time of your webservice client proxy:

#WebClientProtocol.Timeout Property
http://msdn2.microsoft.com/en-us/lib...rotocols.webcl
ientprotocol.timeout(vs.80).aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.



Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.

==================================================



This posting is provided "AS IS" with no warranties, and confers no rights.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.