views:

204

answers:

2

I have old code that call a .net webservices that throws this error if the .net code is cold (not in memory)

msxml6.dll error '80072ee2' 

The operation timed out

A reload always fixes this

Can I change the timeout? Can I stop the .net from going cold? Can I trap the error in classic asp and do reload to stop the user see the error?

any other idea to solve this.

+2  A: 

The ServerXMLHTTTPRequest object has a setTimeouts method:-

xhr.setTimeouts 30000, 60000, 30000, 120000

This sets the receive timeout (that last number) to 2 minutes (the default is 30 seconds) its this value you want to play with.

AnthonyWJones
+1  A: 

Thanks to Anthony for the hint -pkb

Here is the documentation and the link to MSDN

oServerXMLHTTPRequest.setTimeouts(resolveTimeout, connectTimeout, sendTimeout, receiveTimeout)

Parameters

resolveTimeout A long integer. The value is applied to mapping host names (such as "www.microsoft.com") to IP addresses; the default value is infinite, meaning no timeout.

connectTimeout A long integer. The value is applied to establishing a communication socket with the target server, with a default timeout value of 60 seconds.

sendTimeout A long integer. The value applies to sending an individual packet of request data (if any) on the communication socket to the target server. A large request sent to a server will normally be broken up into multiple packets; the send timeout applies to sending each packet individually. The default value is 30 seconds.

receiveTimeout A long integer. The value applies to receiving a packet of response data from the target server. Large responses will be broken up into multiple packets; the receive timeout applies to fetching each packet of data off the socket. The default value is 30 seconds.

http://msdn.microsoft.com/en-us/library/ms760403%28VS.85,lightweight%29.aspx

Pbearne