delphi端的發送代碼 function Tverpipxinfo.postXml(const xmlstr, url: WideString): WideString;varidHttp:TIdHTTP;sends:tstrings;IdEncoderMIME1:TIdEncoderMIME;begin result:=''; try idHttp:= TIdHTTP.Create(nil); idHttp.Request.ContentType := 'application/x-www-form-urlencoded'; IdEncoderMIME1:=TIdEncoderMIME.Create(nil); sends:=tstringlist.Create; sends.Add('xmlstr='+IdEncoderMIME1.Encode(xmlstr)); result:=idhttp.Post(url,sends); except on E:Exception do begin result:=e.Message; end; end; idHttp.Free; IdEncoderMIME1.Free; sends.Free;end;asp端接收方法 <%@ Language=VBScript %><%'On Error Resume Next xmlstr=Request.form("xmlstr") set xmlobj=server.CreateObject("microsoft.xmldom") xmlobj.loadXML xmlstr Response.ContentType="text/xml"%> <?xml version="1.0" encoding="big5"?> <% Response.Write xmlobj.xml set xmlobj=nothing%>aspx端接收方法 private void Page_Load(object sender, System.EventArgs e){ string str = ""; string reqstr=""; try { XmlDocument doc = new XmlDocument(); //doc.Load(Request.InputStream); reqstr=Request.Form["xmlstr"]; reqstr =Encoding.GetEncoding("big5").GetString(Convert.FromBase64String(reqstr)); doc.LoadXml(reqstr); doc.Save("d:/test.xml"); Response.Write("How are you.."); } catch(Exception e1) { str = e1.Message; } Response.Write("str ==" + str);} 转载于:https://www.cnblogs.com/oisiv/archive/2005/06/23/179633.html