Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > setting a timeout when consuming a WS

Reply
Thread Tools

setting a timeout when consuming a WS

 
 
GaryDean
Guest
Posts: n/a
 
      04-28-2007
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
 
 
 
 
Manish Bafna
Guest
Posts: n/a
 
      04-29-2007
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:

> 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
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      04-30-2007
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

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
consuming webserver timeout issue Grant Merwitz ASP .Net 1 10-03-2005 03:09 PM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
Session contents lost despite Session.Timeout = 3000; and <sessionState mode="InProc" cookieless="false" timeout="300"> Carpe Diem ASP .Net 3 02-23-2004 07:10 PM
web.config session timeout and forms authentication timeout Do ASP .Net 2 11-23-2003 02:27 PM
Re: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. Bob Johnson ASP .Net 0 08-07-2003 12:52 PM



Advertisments