I am talking about using XMLHTTP in server-side ASP code. However, I
have
tried using ServerXMLHTTP, namely MSXML2.ServerXMLHTTP object, in
replace
of
Microsoft.XMLHTTP. Sometimes it works perfectly fine but sometimes it
gives
me time out error, which gave me a headache:
msxml3.dll error '80072ee2'
The operation timed out
That beats hanging IE for half an hour, doesn't it?
You could trap
the
error and retry, but the core issue would be whatever's causing it to
timeout. Is there any chance the underlying SQL is deadlocking? When
the
condition occurs again, use Enterprise Manager -> Management -> Current
Activity -> Process Info, or execute sp_who2 in Query Analyzer, to check
for
any blocking processes.
That assumes, of course, you're using SQL Server as the database
back-end.
If not, deadlock is still the avenue I would pursue, but I don't know
enough
about Oracle or MySQL (and don't care enough about Jet) to offer any real
help.
For using XMLHTTP, my two asp pages are in different virtual
directories.
The calling asp page will call XMLHTTP object to get some data
dynamically
from other asp page and then display information to the IE. Hm.. so
setting
async to true will not help in this issue...
If two asp pages are in the same virtual directory, will it hang IE all
the
times or just once in a while? And once it hangs, do we have to
restart
the
IIS in order to work again or we can just wait? Cause in my situation,
it
will hang just once in a while. Thanks!!
Caller and callee in the same virtual dir will hang IIS every time; IE
also
appears to hang but that's more of a side-effect than anything else. I
personally have never been patient enough to wait that long for a hung
process. IIS may do something to self-correct eventually, but I always
end-up resetting it myself long before that occurs.
Vanessa
:
I have a question regarding async mode for calling Microsoft.XMLHTTP
object.
Microsoft.XMLHTTP hangs the IE once in a while suddenly, but it will
work
again after half an hour or so without doing anything. I have
searched
through the Internet and seems like the reason it hangs the browser
it's
because XMLHTTP limits you to two concurrent HTTP connections to
each
remote
host; so if more than 2 concurrent connections strike the script
which
is
calling XMLHTTP, it will hang. Is that true?
Are you talking about using XMLHTTP in server-side ASP code, or
client-side
script [emitted from ASP, but executed by IE]?
If the former, you should be using XMLHTTPServer -- but note that with
either object, you cannot call another ASP in the same virtual
directory
as
the calling ASP. (Doing so will hang the virtual server.)
If the latter, try adding the "defer" attribute to your script tags
(<script
defer>) which will defer execution until after the page has completely
loaded.
In neither case is async operation likely to be extremely useful, I've
never
managed to get XMLHTTP events to work quite right in HTML script, and
on
the
server side, ASP doesn't lend itself to async calls at all. You'll
use
more
CPU looping on a readystate check than waiting for the call to
complete --
particularly without a native way to "sleep" the calling process.
What's more, async calls would be more likely to incur more
connections,
not
less likely (given a single-threaded environment like ASP script.)
Lastly, 30 minutes is an awfully long time to hang, so it would seem
at
least a little deeper than the connection limit.
-Mark
If that the case, can I change async mode to true (async=true) so
that
it
will only take one connection at a time, meanwhile other concurrent
connections will loop and wait till XMLHTTP is ready to process data
again.
Will that work?
Please help me cause I am not sure whether my impression is correct
or
not.
Thanks!