发送 XML 字符串作为响应 [英] Send XML String as Response

查看:25
本文介绍了发送 XML 字符串作为响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从第三方应用程序(不同域)向我的 ASP 应用程序获取我的请求.我正在处理请求并在我的应用程序中执行业务部分,作为确认,我需要将 XML 字符串作为响应发送到将请求发布到我的应用程序的同一页面.我成功地使用以下代码从请求中检索输入

I am getting my Request from a third party application(different domain) to my ASP application. I am handling the request and doing the business part in my application and as a acknowledgement I need to send XML string as Response to the same Page which POSTED the request to my Application. I was successful in retrieving the input from Request using the following code

  NameValueCollection postPageCollection = Request.Form;
  foreach (string name in postPageCollection.AllKeys)
    {
        ... = postPageCollection[name]);
    }

但我不确定如何将响应与 XML 字符串一起发送回站点(不同域)?

But i am not sure how to send back the response along with XML String to the site(different domain)?

如何从发生 POST 的地方获取 URL.

How to get the URL from where the POST happened.

推荐答案

你能不能直接用下面的代码:

Cant you just use the following code:

Request.UrlReferrer.ToString();

这篇关于发送 XML 字符串作为响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆