p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/)
-   Classic ASP XML (http://p2p.wrox.com/classic-asp-xml-69/)
-   -   ServerXMLHTTP returning the same responseText with simultaneous requests (http://p2p.wrox.com/classic-asp-xml/99532-serverxmlhttp-returning-same-responsetext-simultaneous-requests.html)

TeresaS May 30th, 2017 03:56 AM

ServerXMLHTTP returning the same responseText with simultaneous requests
 
Hello,

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:

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>")
Response.End
End If
On Error Goto 0
xmlHttp.setRequestHeader "User-Agent", "asp httprequest"
xmlHttp.setRequestHeader "Content-Type", "text/json"
xmlHttp.Send
resultatJSON = xmlHttp.responseText
xmlHttp.abort()
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:07 PM.

Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
2013 John Wiley & Sons, Inc.