Web reference timeout

  • Thread starter Thread starter cj
  • Start date Start date
C

cj

I have a VB2005 windows app that uses a web reference to submit a soap
request to a business partner. I'm not the most knowledgeable on this
topic but what I have works and has worked for months now just fine. My
problem is when issue the command

RespStr=proxy.validate(soapmsg)

if our business partner has some kind of problem on their end it takes
forever for it to timeout and give me an error. How can I adjust the
timeout? I hope someone knows.

Thanks.
 
Hello CJ,

As for vs 2005/.net wsdl.exe generated webservice client proxy class, it is
derived from SoapHttpClientProtocol class(derived from WebClientProtocol
class). And WebClientProtocol has a "Timeout" property defined for control
the time wait for a synchronous web request call:

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

Therefore, you can adjust this value(by default it is set to 100000
milliseconds) after you created the webservice proxy. e.g.

MyServiceProxy proxy = new MyServiceProxy();
proxy.Timeout = 15000;

BTW, if you're caring about the long waiting time during the synchronous
webmethod call, you can consider either use asynchronou(callback) mode or
schedule the webmethod call into a separate worker thread so that your
front UI thread won't be affected.

Hope this helps some.

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.
 
You're welcome ;-)

If there is anything else we can help, please feel free to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 
Back
Top