Prev: iis
Next: Set Global Variable Within a Function
From: NeedHelp on 11 Feb 2010 09:32 Hi, I am using following code in my asp file: Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP") xml.Open "GET", url, False xml.Send s = xml.responseText Set xml = Nothing Sometimes (not always), the asp file didn't work and returned Time Out. Every time when it happend, I immediately clicked the refresh button of my bowser and the asp file would work fine. I think there must be something I am missing....Do you have any idea?
From: Evertjan. on 11 Feb 2010 10:43 NeedHelp wrote on 11 feb 2010 in microsoft.public.inetserver.asp.general: > Hi, > > I am using following code in my asp file: > > Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP") > xml.Open "GET", url, False > xml.Send > s = xml.responseText > Set xml = Nothing > > Sometimes (not always), the asp file didn't work and returned Time > Out. Every time when it happend, I immediately clicked the refresh > button of my bowser and the asp file would work fine. > > I think there must be something I am missing....Do you have any idea? It seems that the "url" was not responding quick enough now and then. You could manipulate 4 different timeouts: <http://msdn.microsoft.com/en-us/library/ms760403(VS.85).aspx> Perhaps using onreadystatechange would help? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: NeedHelp on 11 Feb 2010 11:19 On Feb 11, 3:43 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote: > NeedHelp wrote on 11 feb 2010 in microsoft.public.inetserver.asp.general: > > > Hi, > > > I am using following code in my asp file: > > > Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP") > > xml.Open "GET", url, False > > xml.Send > > s = xml.responseText > > Set xml = Nothing > > > Sometimes (not always), the asp file didn't work and returned Time > > Out. Every time when it happend, I immediately clicked the refresh > > button of my bowser and the asp file would work fine. > > > I think there must be something I am missing....Do you have any idea? > > It seems that the "url" was not responding quick enough now and then. > > You could manipulate 4 different timeouts: > <http://msdn.microsoft.com/en-us/library/ms760403(VS.85).aspx> > > Perhaps using onreadystatechange would help? > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress) Thank you. I don't want to set the timeout because I need the "url" responding as fast as possible. It seems to me that after the timeout, I can get responding quickly (immediately) by click the refresh button (run the file second time), Why not responds quickly at the first time?
From: Evertjan. on 11 Feb 2010 13:24 NeedHelp wrote on 11 feb 2010 in microsoft.public.inetserver.asp.general: > On Feb 11, 3:43�pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote: >> NeedHelp wrote on 11 feb 2010 in >> microsoft.public.inetserver.asp.general: >> >> > Hi, >> >> > I am using following code in my asp file: >> >> > Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP") >> > xml.Open "GET", url, False >> > xml.Send >> > s = xml.responseText >> > Set xml = Nothing >> >> > Sometimes (not always), the asp file didn't work and returned Time >> > Out. Every time when it happend, I immediately clicked the refresh >> > button of my bowser and the asp file would work fine. >> >> > I think there must be something I am missing....Do you have any >> > idea? >> >> It seems that the "url" was not responding quick enough now and then. >> >> You could manipulate 4 different timeouts: >> <http://msdn.microsoft.com/en-us/library/ms760403(VS.85).aspx> >> >> Perhaps using onreadystatechange would help? [please do not quote signatures on usenet] > Thank you. > I don't want to set the timeout because I need the "url" responding as > fast as possible. Wrong idea. A timeout gives the maximum time before an error is raised or a default error action is done, Such timeout does not slow down ther normal action. > It seems to me that after the timeout, I can get > responding quickly (immediately) by click the refresh button (run > the file second time), Why not responds quickly at the first time? Because the url stream is only intermittently slow? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
From: NeedHelp on 11 Feb 2010 16:25
On Feb 11, 6:24 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote: > NeedHelp wrote on 11 feb 2010 in > microsoft.public.inetserver.asp.general: > > > > > > > On Feb 11, 3:43 pm, "Evertjan." <exjxw.hannivo...(a)interxnl.net> wrote: > >> NeedHelp wrote on 11 feb 2010 in > >> microsoft.public.inetserver.asp.general: > > >> > Hi, > > >> > I am using following code in my asp file: > > >> > Set xml = Server.CreateObject("Msxml2.ServerXMLHTTP") > >> > xml.Open "GET", url, False > >> > xml.Send > >> > s = xml.responseText > >> > Set xml = Nothing > > >> > Sometimes (not always), the asp file didn't work and returned Time > >> > Out. Every time when it happend, I immediately clicked the refresh > >> > button of my bowser and the asp file would work fine. > > >> > I think there must be something I am missing....Do you have any > >> > idea? > > >> It seems that the "url" was not responding quick enough now and then. > > >> You could manipulate 4 different timeouts: > >> <http://msdn.microsoft.com/en-us/library/ms760403(VS.85).aspx> > > >> Perhaps using onreadystatechange would help? > > [please do not quote signatures on usenet] > > > Thank you. > > I don't want to set the timeout because I need the "url" responding as > > fast as possible. > > Wrong idea. > > A timeout gives the maximum time before an error is raised or a default > error action is done, > > Such timeout does not slow down ther normal action. > > > It seems to me that after the timeout, I can get > > responding quickly (immediately) by click the refresh button (run > > the file second time), Why not responds quickly at the first time? > > Because the url stream is only intermittently slow? > > -- > Evertjan. > The Netherlands. > (Please change the x'es to dots in my emailaddress)- Hide quoted text - > > - Show quoted text - Thank you. Yes, I believe you are right: A timeout gives the maximum time before an error is raised or a default error action is done, And such timeout does not slow down ther normal action. However, setting timeout wont solve my problem. I want to find why whenever timeout error happened and run the code again immediately, the code can run with no time. If I find the reason, I might able to set something or modify something and never let the timeout error display on the users' browsers! (The asp code is running in my web site.) |