Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

server.ScriptTimeout and XML 1

Status
Not open for further replies.

kylua

Technical User
Sep 30, 2002
199
GB
Hi

I am having difficulties with an XML request taking 6 minutes to time out. Sorting the reason for the failure of the XML is a different issue but for damage limitation I would like my script to time out much quicker than currently. I have set the server.ScriptTimeout to 90 secs and it times out on that on 'infinite loops'.

Any way of forcing a disconn from an XML request?

Many thanks

Colin
 
Do you mean a connection request to another site using XMLHTTP or a connection request _from_ another site to your page that is not timing out?

If your getting stuck with an XMLHTTP connection than you could use the asynchronous method of connecting (last argument in .Open call) and then loop until the readyState property is good (4?). Inside the loop you can compare a time set before the send with Now() and should it go over your time limit, kill the XMLHTTP object, output an error message, and Response.End

-T

barcode_1.gif
 
Thanks, that has sorted more than I thought! When I set it to asynchronous the service on the other end processed my request with no problems. For some reason they couldn't send a text out whilst I was waiting for the response for that text. Two separate companies!!!

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top