简体   繁体   English

http响应和response.redirect在经典ASP中同时重定向

[英]http response and response.redirect simultameously in classic asp

I am having an asp page(Sendxml.asp) which post an xml to another asp page (Receivexml.asp). 我有一个asp页面(Sendxml.asp),该页面将xml发布到另一个asp页面(Receivexml.asp)。 On ReceiveXML.asp, I process the xml and send back the http response to SendXML.asp page and this works fine. 在ReceiveXML.asp上,我处理xml并将http响应发送回SendXML.asp页,并且可以正常工作。

Now i have a situation where I have to send back the http response from ReceiveXML.asp to SendXML.asp but also i have to redirect the user to another url (page) from ReceiveXML.asp page. 现在,我不得不将HTTP响应从ReceiveXML.asp发送回SendXML.asp,但又不得不将用户重定向到ReceiveXML.asp页面的另一个URL(页面)。

Could any one please help me to achieve this. 谁能帮助我实现这一目标。

You can't make a redirect in ReceiveXML.asp as that page is only returning data to SendXML.asp . 您无法在ReceiveXML.asp进行重定向,因为该页面仅将数据返回到SendXML.asp

You can only return one response for each request, and a redirect is also a form of response. 您只能为每个请求返回一个响应,重定向也是一种响应形式。 Also, even if you return a redirect from ReceiveXML.asp that would only affect what is returned to SendXML.asp , it doesn't affect what SendXML.asp returns to the browser. 同样,即使您从ReceiveXML.asp返回的重定向仅影响返回到SendXML.asp ,也不会影响SendXML.asp返回到浏览器的SendXML.asp

To redirect the user you have to do that in SendXML.asp . 要重定向用户,您必须在SendXML.asp执行此SendXML.asp

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM