Re: Try - Catch
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
You need to change the timeout for the service. This depends on what sort
of service you are accessing. Is it a WebService? TCP/IP?
"Rudiga" <none@xxxxxxxx> wrote in message
news:QwXOf.74862$m13.70994@xxxxxxxxxxxxxxxxxxxxxxx
Hi
I am trying to build in a try-catch block to access a web service and am
trying to control how long it attempts to access to service before running
the catch part of the code. Is there a specific way of doing this?
try
{
// access service
//ans = return answer from service
//run calculations on answer
}
catch (Exception)
{
Console.WriteLine("Error in connecting to service");
}
This code works however takes forever to give up the try part of the code.
Thank you
Rudiga
.
Relevant Pages
- RE: Setting web service timeout in vb.net
... you can directly set this "Timeout" property on the ... client-side proxy. ... that your webservice proxy class is derived from "SoapHttpClientProtocol": ... It gives no specific directions and I could not find a ... (microsoft.public.dotnet.languages.vb) - RE: Record lock timeout with webservices
... As you mentioned that since it is the webservice which makes the ... > apply a timeout on it, ... the oracle server is not ... >> Use transaction in strored procedure instead of web service. ... (microsoft.public.dotnet.framework.webservices) - Re: Webservice problem (after iisreset)
... I was speaking about whatever means you're suing the make the call from the client. ... If it already waits one minute for the failure then it sounds like the timeout is already high enough. ... So use wsdl.exe to generate a .NET proxy to your webservice to see if that style of client has the same problems or not. ... If it does, then it sounds like something on the server, if it does not then it's likley your HTC framework. ... (microsoft.public.dotnet.framework.aspnet.webservices) - RE: Setting web service timeout in vb.net
... Microsoft MSDN Online Support Lead ... class of the webservice proxy (you generate through "Add WebReference" ... webservice's method call Timeout through the ... (microsoft.public.dotnet.languages.vb) - WebService ignoring timeout properties? (Server was unable to process request. --> Timeout e
... WebService code runs 3 SqlCommands that has timeouts set to 300 sec. Client ... WebService proxy has a timeout of 900 sec. ... monday - probably 'cause of more orders during the week-end) the server runs ... (microsoft.public.dotnet.framework.aspnet.webservices) |
|