English 中文(简体)
传统协会中的交叉领域XMLHttpRequest
原标题:Cross domain XMLHttpRequest in classic ASP

我的法典正在做罚款,直到一把它转移到另一个拥有防火墙的服务器。 其后,我的法典的某些部分没有发挥作用。 这似乎是一个xml-http POST问题。 请允许我指出正确的方向,以及如何确定防火墙是否是问题。 我的客户坚持要求我使用传统的手法,因此不能升级到网。

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
问题回答

它对我的工作几乎是罚款。 Seems that there s redirection on the death page You re calls that can be addressed. 似乎没有防火墙问题(也许像Charles或Fiddler这样的代理应用可以帮助你看看你是否由于你的防火墙而出现通信问题,但我不认为如此)。

因此试图指出最后目的地网页:

<>SUBMIT_URL = “http://abc.go.com/confirm.asp”

我看不出时间变数点,除非你在上任之前删除该代码。





相关问题
How to import excel file in web page useing Classic ASP?

We are trying to open an existing excel file (2003) from server location in a web page and save it again in the same location using following syntax. Set ExcelReportApp = CreateObject("Excel....

What s the best method to do paging in my ASP page

What s the best method to do paging in my ASP page when displaying a list of items? I knew that there is no equivalent to MySQL s LIMIT clause present in SQL Server, either 2000 or 2005. How can I ...

Using Classes in a Dictionary in Classic ASP

I usually do C# but have inherited a classic ASP project. I have defined a class: Class clsPayment Public Name End Class Set objPayment = New clsPayment objPayment.Name = "...

Response.Redirect HTTP status code

Why is it that ASP/ASP.NET Response.Redirect uses a HTTP-302 status code ("Moved Temporarily") even though in most cases a HTTP-301 status code ("Moved Permanently") would be more appropriate?

form inside form serialize problem

I am trying to submit a form inside another form because I will need first form s outcome in the second form. I tried using form serialize as advised in some other threads. Problem here is, I dont ...

热门标签