473,695 Members | 2,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XMLHTTP async

I have a question regarding async mode for calling Microsoft.XMLHT TP object.

Microsoft.XMLHT TP 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?

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!
Sep 24 '05 #1
6 10449

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:86******** *************** ***********@mic rosoft.com...
I have a question regarding async mode for calling Microsoft.XMLHT TP
object.

Microsoft.XMLHT TP 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!

Sep 24 '05 #2
I am talking about using XMLHTTP in server-side ASP code. However, I have
tried using ServerXMLHTTP, namely MSXML2.ServerXM LHTTP object, in replace of
Microsoft.XMLHT TP. 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

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!!

Vanessa

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:86******** *************** ***********@mic rosoft.com...
I have a question regarding async mode for calling Microsoft.XMLHT TP
object.

Microsoft.XMLHT TP 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!


Sep 26 '05 #3

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
I am talking about using XMLHTTP in server-side ASP code. However, I have
tried using ServerXMLHTTP, namely MSXML2.ServerXM LHTTP object, in replace
of
Microsoft.XMLHT TP. 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

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:86******** *************** ***********@mic rosoft.com...
>I have a question regarding async mode for calling Microsoft.XMLHT TP
>object.
>
> Microsoft.XMLHT TP 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!


Sep 26 '05 #4
Mark,

Yes! If the time out error occurs from using ServerXMLHTTP, it hangs for
half an hour or so too! :( It's like if I used XMLHTTP, it just hangs IE
with no error message. If I used ServerXMLHTTP, it will give me time out
error. For both cases, it doesn't occur all the times and I have to wait for
half an hour or so for it to be back up again. But too bad I can't simply
restart IIS cause we have so many users connect to it. So if it's not the
last thing we can do to fix the problem, we can't restart it! :(

So Mark, how can I trap the error and retry? Is that using On Error resume
next statement? I think I tried it before but seems like doesn't work or so.
Here is my code calling XMLHTTP:
Response.Buffer = True
Set xml = Server.CreateOb ject("Microsoft .XMLHTTP")
'Set xml = Server.CreateOb ject("MSXML2.Se rverXMLHTTP")
'xml.setTimeout s 60000, 60000, 60000, 60000
xml.Open "POST", PostURL, False,"",""
xml.Send
FOBprice = xml.responseTex t
Set xml = Nothing

and yes, I am using SQL Server and thanks for the tips on checking deadlock
situation! I will definitely look it up if this condition occurs again! So
if it occurs again, will the status for that particular process show
"deadlock"? If yes, can I kill that process and the problem will be fixed?

Thanks again and again :-)

Vanessa

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
I am talking about using XMLHTTP in server-side ASP code. However, I have
tried using ServerXMLHTTP, namely MSXML2.ServerXM LHTTP object, in replace
of
Microsoft.XMLHT TP. 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

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:86******** *************** ***********@mic rosoft.com...
>I have a question regarding async mode for calling Microsoft.XMLHT TP
>object.
>
> Microsoft.XMLHT TP 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!


Sep 26 '05 #5

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:1B******** *************** ***********@mic rosoft.com...
Mark,

Yes! If the time out error occurs from using ServerXMLHTTP, it hangs for
half an hour or so too! :( It's like if I used XMLHTTP, it just hangs IE
with no error message. If I used ServerXMLHTTP, it will give me time out
error. For both cases, it doesn't occur all the times and I have to wait
for
half an hour or so for it to be back up again. But too bad I can't simply
restart IIS cause we have so many users connect to it. So if it's not the
last thing we can do to fix the problem, we can't restart it! :(

So Mark, how can I trap the error and retry? Is that using On Error resume
next statement? I think I tried it before but seems like doesn't work or
so.
Yes, you've got it... there are some untrappable errors but anything that's
thrown by a COM object should trap. Then after Send returns, test the Err
object:
Here is my code calling XMLHTTP:
Response.Buffer = True
Set xml = Server.CreateOb ject("Microsoft .XMLHTTP")
'Set xml = Server.CreateOb ject("MSXML2.Se rverXMLHTTP")
'xml.setTimeout s 60000, 60000, 60000, 60000
xml.Open "POST", PostURL, False,"",""
On Error Resume Next
xml.Send
If Err.Number > 0 Then ' you may want to test for a specific error value
' do something here to retry, maybe wrap the XML call in a function and
call it here
End If

On Error Goto 0 ' turn errors back on
FOBprice = xml.responseTex t
Set xml = Nothing

and yes, I am using SQL Server and thanks for the tips on checking
deadlock
situation! I will definitely look it up if this condition occurs again!
So
if it occurs again, will the status for that particular process show
"deadlock"? If yes, can I kill that process and the problem will be fixed?
In Enterprise Manager Process Info there are the columns Blocking and
Blocked By, that give you the involved process IDs. You're looking for one
that's got a number in Blocked By. Double-click the item in the list and
usually it will show you the last SQL statement executed by the process.
Click the kill button, game over.

In Query Analyzer, the results of sp_who2 have a BlkBy column, and you can
execute the KILL command to kill a process.

Good Luck! :-)

-Mark
Thanks again and again :-)

Vanessa

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
>I am talking about using XMLHTTP in server-side ASP code. However, I
>have
> tried using ServerXMLHTTP, namely MSXML2.ServerXM LHTTP object, in
> replace
> of
> Microsoft.XMLHT TP. 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
>
> "Mark J. McGinty" wrote:
>
>>
>> "Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
>> news:86******** *************** ***********@mic rosoft.com...
>> >I have a question regarding async mode for calling Microsoft.XMLHT TP
>> >object.
>> >
>> > Microsoft.XMLHT TP 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!
>>
>>
>>


Sep 26 '05 #6
Thanks Mark!
I will try both. Thanks for your help :)

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:1B******** *************** ***********@mic rosoft.com...
Mark,

Yes! If the time out error occurs from using ServerXMLHTTP, it hangs for
half an hour or so too! :( It's like if I used XMLHTTP, it just hangs IE
with no error message. If I used ServerXMLHTTP, it will give me time out
error. For both cases, it doesn't occur all the times and I have to wait
for
half an hour or so for it to be back up again. But too bad I can't simply
restart IIS cause we have so many users connect to it. So if it's not the
last thing we can do to fix the problem, we can't restart it! :(

So Mark, how can I trap the error and retry? Is that using On Error resume
next statement? I think I tried it before but seems like doesn't work or
so.


Yes, you've got it... there are some untrappable errors but anything that's
thrown by a COM object should trap. Then after Send returns, test the Err
object:
Here is my code calling XMLHTTP:
Response.Buffer = True
Set xml = Server.CreateOb ject("Microsoft .XMLHTTP")
'Set xml = Server.CreateOb ject("MSXML2.Se rverXMLHTTP")
'xml.setTimeout s 60000, 60000, 60000, 60000
xml.Open "POST", PostURL, False,"",""


On Error Resume Next
xml.Send


If Err.Number > 0 Then ' you may want to test for a specific error value
' do something here to retry, maybe wrap the XML call in a function and
call it here
End If

On Error Goto 0 ' turn errors back on
FOBprice = xml.responseTex t
Set xml = Nothing

and yes, I am using SQL Server and thanks for the tips on checking
deadlock
situation! I will definitely look it up if this condition occurs again!
So
if it occurs again, will the status for that particular process show
"deadlock"? If yes, can I kill that process and the problem will be fixed?


In Enterprise Manager Process Info there are the columns Blocking and
Blocked By, that give you the involved process IDs. You're looking for one
that's got a number in Blocked By. Double-click the item in the list and
usually it will show you the last SQL statement executed by the process.
Click the kill button, game over.

In Query Analyzer, the results of sp_who2 have a BlkBy column, and you can
execute the KILL command to kill a process.

Good Luck! :-)

-Mark
Thanks again and again :-)

Vanessa

"Mark J. McGinty" wrote:

"Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
news:10******** *************** ***********@mic rosoft.com...
>I am talking about using XMLHTTP in server-side ASP code. However, I
>have
> tried using ServerXMLHTTP, namely MSXML2.ServerXM LHTTP object, in
> replace
> of
> Microsoft.XMLHT TP. 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
>
> "Mark J. McGinty" wrote:
>
>>
>> "Vanessa" <Va*****@discus sions.microsoft .com> wrote in message
>> news:86******** *************** ***********@mic rosoft.com...
>> >I have a question regarding async mode for calling Microsoft.XMLHT TP
>> >object.
>> >
>> > Microsoft.XMLHT TP 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!
>>
>>
>>


Sep 26 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4322
by: Brian Staff | last post by:
I was recently on a OO Design course<g> and as a result I've decided to "Tier" my ASP classic pages for maintainability. Browser <----> PT <---> BT <---> DT PT == Presentation Tier BT == Business Tier DT == Data Tier Right now, the browser communicates with just one ASP page and it's a fairly simple job to divide each one into 3 separate ASP pages with each new page
2
2381
by: @rpus - Development | last post by:
I have the folloving function in vb .net: Function SendXMLReq() As String Dim returnval As String Dim xmlhttp As Object = New MSXML2.ServerXMLHTTP Dim objXMLSend = New MSXML2.DOMDocument Dim allok As Boolean = False objXMLSend.async = False objXMLSend.loadXML("<?xml version=""1.0""?><saldo><msisdn>4550100023</msisdn></saldo>")
5
3344
by: warteschlange | last post by:
i want to postload javscript from another javascript. This works fine in firefox and IE6 for macIE i can use an Iframe to load the code and inject it with insertAdjacentHTML The problems arise with safari and opera. both load the new code with XMLHttpRequest, but the code is no 'executable' To make this possible on IE i had to use the magic 'DEFER' attribute.
5
449
by: jim.frantzen | last post by:
You have an active XMLHTTP request on the main page (localhost/App1/index.aspx) The XMLHTTP request takes about 60 seconds to receive a response back from localhost/App1/getxml.aspx. You have an IFRAME on this main page. When you set the iframe's src to google.com, it works fine. When you set the iframe's src to localhost/App1/test.htm, it works fine. When you set the iframe's src to
5
1843
by: Ric | last post by:
I created a page in ASP.Net (with no buffering) that does the following: Output line #1 FLUSH {wait 1 second} Output line #2 {wait 1 second} Output line #3 FLUSH
0
1237
by: damianarielfernandez | last post by:
Hi Group, I've a problem when I call via Ajaxs a page that is on Integrated Security. The result come back but if i sniff with Fiddler the calls to my server for my surprise have two, one came back with an error of authentication "You are not authorized to view this page", 401 classic, and the other with the result of my call. The most weird case is that the IE after 10 request aprox, crash...memory leak, this off course is the real...
1
3774
by: =?Utf-8?B?WmFnb3I=?= | last post by:
I have the code below and in a random fashion it is responding extremely slowly. On in 3-4 times it takes ages to do the job... Any help will be much appreciated... It is the line: xml_http.Send("") that gets stuck. I am on IIS 6 on Windows Server 2003 Web Edition. <% pcode = request.querystring("postcode") source2 = "http://3rdparty.com/addresslist.pce?postcode=" & pcode
2
2302
by: KingdomHeart | last post by:
I recently write code to get IP address of my network devices in Call Manager. ANd I got problems with xmlhttp and xmldoc. what is wrong with these 2 lines below? xmlhttp.Send(); xmlDoc.loadXML(xmlhttp.responseText); here is the function getDeviceList function getDeviceList(callManager, userID, password, protocol) {
7
2145
by: Dan Beanweed | last post by:
I am experimenting with XMLHTTP in a personal website. If I can understand it I would like to use it in a SVG application at work. But I don't get what's going on with my code, especially after reading the posts on this and other fora. I create an object using "xmlhttp = new XMLHttpRequest();", no problem. Then I have this script: function getContent(file){ if(file==""){ return; } xmlhttp.onReadyStateChange=stateChange();...
0
8619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9112
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8975
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8818
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6487
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5832
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4575
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.