Web Method TimeOut

L

Lucas Ponzo

How to determine the time out for a web method ? Can I configure it for the
overall WebService ?

It's because some tasks are long runing operations.

Another situation is when debugging a web method. In the mean time, the
client thrown an Operarion Timeout Exception.
 
S

Steven Cheng[MSFT]

Hello Lucas,

As for the webservice, is it an ASP.NET asmx webservice? If so, when you
consuming the webservice in .net client application, there has two
setttings that will affect the webservice call timeout behavior:

** The ASP.NET webservice's server-side httpruntime timeout setting, this
is configured through the following element:

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

<configuration>
<system.web>
<httpRuntime .............
executionTimeout="45"
.............../>
</system.web>
</configuration>

Also, make sure that you've set the <compilation debug="false" /> so as to
make the timeout work correctly.


** If you're using the wsdl.exe or VS IDE "add webreference" generated
proxy to call webservice methods, there is also a timeout setting on the
client proxy class(derived from SoapHttpClientProtocol class). This is the
"Timeout" property derived from "WebClientProtocol" class:

#WebClientProtocol.Timeout Property
http://msdn2.microsoft.com/en-us/library/system.web.services.protocols.webcl
ientprotocol.timeout.aspx

Therefore, you can consider adjusting these two values according to your
application's scenario. Here is a former thread also mentioned this:


http://groups.google.com/group/microsoft.public.dotnet.framework.webservices
/browse_thread/thread/73548848d0544bc9/bbf6737586ca3901

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



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

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.

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



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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top