Cross domain XMLHttpRequest in classic ASP
Posted
by HahaHehe
on Stack Overflow
See other posts from Stack Overflow
or by HahaHehe
Published on 2010-06-14T12:22:49Z
Indexed on
2010/06/14
13:02 UTC
Read the original article
Hit count: 182
asp-classic
|xmlhttprequest
My code is working fine till i migrate it to another server with firewall. After since, some part of my code is not working. Its seem to be the xmlhttp POST problem. Can someone point me to the right direction and how to determine if the firewall is the problem. My client insisted to me to use classic asp, so i cannot upgrade to .net.
Dim objHttp
SUBMIT_URL = "http://www.abc.com/confirm.asp"
Call Process()
Public Sub Process()
set objHttp = Server.CreateObject("Microsoft.XMLHTTP")
'set the timeout values in milliseconds
lResolve = 1 * 1000
lConnect = 1 * 1000
lSend = 2 * 1000
lReceive = 2 * 1000
objHttp.open "POST", SUBMIT_URL, false
objHttp.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHttp.Send str
if err.number <> 0 then
Response.Write "Error : " & err.Description
err.Clear
end if
End Sub
© Stack Overflow or respective owner