?
Solved

OPERATION TIMED OUT ERROR HANDLING

Posted on 2005-04-11
1
Medium Priority
?
387 Views
Last Modified: 2008-02-01
Hi experts,

I have some code which retrieves and xml string from a remote server. I have set the xmlServerHttp.setTimeouts method of the xmlHTTP object as below:

dim xmlServerHttp, objXML
Set xmlServerHttp = Server.CreateObject("Msxml2.ServerXmlHttp.3.0")

lResolve = 5 * 1000
lConnect = 5 * 1000
lSend = 15 * 1000
lReceive = 15 * 1000
xmlServerHttp.setTimeouts  lResolve, lConnect, lSend, lReceive

xmlServerHttp.Open "POST", heURLVal , False
xmlServerHttp.setRequestHeader "Content-Type","application/x-www-form-urlencoded"
xmlServerHttp.Send strxml

responseString = xmlServerHttp.responsetext

if testMode then
Response.Write "<xmp>"
Response.Write(responseString)
Response.Write "</xmp><br><br>"



As I understand it if any of the xmlServerHttp.setTimeouts properties times out then the error returned will be a script timed out error.


What I need to know is how do I trap this error, deal with it, and make sure that it doesn't break my ASP page at runtime?



Any ideas?




PJORDANNA



0
Comment
Question by:pjordanna
1 Comment
 
LVL 15

Accepted Solution

by:
deighc earned 2000 total points
ID: 13751726
> As I understand it if any of the xmlServerHttp.setTimeouts properties
> times out then the error returned will be a script timed out error.

This is not correct. If any of the timeouts specified by the SetTimeouts method are met then the HTTP connection established (or attempting to be established) by XMLHTTP is terminated. This has nothing to do with the script timeout of your ASP page.

You can check the Status property of XMLHTTP to see what's happening with your HTTP connection and proceed accordingly.

So set the timeouts, call Send() then check the status property to see what's happening.

See here for more info:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmprostatusServerXMLHTTP.asp?frame=true
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question