View Single Post
  #1 (permalink)  
Old May 30th, 2017, 02:56 AM
TeresaS TeresaS is offline
Registered User
Points: 10, Level: 1
Points: 10, Level: 1 Points: 10, Level: 1 Points: 10, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: May 2017
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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!!
Reply With Quote