p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP XML (http://p2p.wrox.com/forumdisplay.php?f=69)
-   -   ServerXMLHTTP returning the same responseText with simultaneous requests (http://p2p.wrox.com/showthread.php?t=99532)

TeresaS May 30th, 2017 02:56 AM

ServerXMLHTTP returning the same responseText with simultaneous requests

It's the first time I post something in a forum (although I check them all the time), so I hope I explain myself right.

I'm stuck in a problem with ServerXMLHTTP.

When there's just one individual request, it returns the expected result. But if they happen at the same time, responseText returns for the slowest one the same result as the faster simultaneous one.

It's been reported by the users, but I tested it running the pages on two different browsers in my pc. I trigger one request and immediately I click on a different one on a different instance of the browser or a different browser.

Here is my code:


Set xmlHttp = Server.Createobject("MSXML2.ServerXMLHTTP")
On Error Resume Next
xmlHttp.Open "GET", "http://someserver/somepath/?somequerystring" , False
xmlHttp.setOption 2, 13056 'ignore all SSL Cert issues
If Err Then 'handle errors
Response.Write(Err.Description & " [0x" & Hex(Err.Number) & "]<BR><BR>")
End If
On Error Goto 0
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "Content-Type", "text/json"
resultatJSON = xmlHttp.responseText
set xmlHttp = Nothing

Hope my explanation was clear. And sorry if I misused some term, English is not my mother tongue.

Many thanks in advance!!

All times are GMT -4. The time now is 03:05 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.