Webservices: Timeout and storing values Q

I

Ivan Demkovitch

Hi!

I have 2 questions:

1. Is there any way to set timeout value when I call web service?

2. Is there any way to store web service response as a string so I can later
use a string as response again.
I want to store response in DB and load same objects again as needed.

P.S. I use wsdl generated proxy classes.

TIA!
 
G

Gery D. Dorazio

Ivan,
Here is some info from Visual Studio docs. However, be aware that an XML Web
service is accessed through the RemotingClientProxy class objects. This
means that the Timeout property shown below is found in the
RemotingClientProxy class. Reading the docs on this says this Timeout value
is only for synchrounous calls.


When you are stepping into an XML Web service from calling code, the call
may sometimes time out, with the result being that you cannot continue
debugging. You may see an error message such as this.

An unhandled exception of type 'System.Net.WebException' occurred in
system.Web.services.dll
Additional information: The operation has timed-out.Solution
To avoid this problem, set the timeout value for the XML Web service call to
infinite, as shown in this example:

Service1 obj = new Service1();
obj.Timeout = -1; // infinite time out.

Regards,
Gery


--
Gery D. Dorazio
Development Engineer

EnQue Corporation
1334 Queens Road
Charlotte, NC 28207
(704) 377-3327
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top