当前位置: 代码迷 >> ASP.NET >> (急)怎么通过http/https向指定的服务器提交*xml文件(或数据)
  详细解决方案

(急)怎么通过http/https向指定的服务器提交*xml文件(或数据)

热度:2444   发布时间:2013-02-26 00:00:00.0
(急)如何通过http/https向指定的服务器提交*.xml文件(或数据)
我想在后台cs代码实现,请问如何做?
另外,我该如何接受对方给我提交回来的*.xml文件?

请各位帮我一下,我很着急!

------解决方案--------------------------------------------------------
发送:
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load( "xxx.xml ");
Response.ContentType = "text/xml "
Response.Charset = "UTF-8 "
Response.Clear()
xmlDoc.Save(Response.OutputStream)
Response.End()

接收:
xmlDoc.Load(Request.InputStream);
------解决方案--------------------------------------------------------
不明白
楼主是需要和第三方主机交换数据么?
还是只是前台xml需要和后台交互?

前者需要用 System.Net里的组件
后者需要在前台用xmlhttp
  相关解决方案