Re: Retrieving values from HTTP POST
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Tue, 16 Aug 2005 02:04:18 GMT
Hi John,
What's the "objXMLDoc" in your code? Is it the MSXML's DOMDocument or the
..NET's
System.Xml.XmlDocument? Since we're not supported to use the COM msxml
component in .NET application, we should use the System.Xml.XmlDocument to
capture xml data. Here is the test code snippet I use in my ASP.NET web
page:
private void Page_Load(object sender, System.EventArgs e)
{
if(Request.ContentType == "text/xml")
{
XmlDocument doc = new XmlDocument();
doc.Load(Request.InputStream);
Response.Write(HttpUtility.HtmlEncode(doc.OuterXml));
Response.End();
}
}
Hope helps. Thanks,
Regards,
Steven Cheng
Microsoft Online Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| NNTP-Posting-Date: Mon, 15 Aug 2005 11:31:02 -0500
| From: John Smith <3rtwemte001@xxxxxxxxxxxxxx>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Subject: Re: Retrieving values from HTTP POST
| Date: Mon, 15 Aug 2005 11:31:02 -0500
| Message-ID: <cpg1g1hsmq6mgsslnmbsnvs7f6jd2mottt@xxxxxxx>
| References: <290521D6-6A0D-4233-AFEF-0F389A511BC3@xxxxxxxxxxxxx>
<1C82FCF5-85B7-48EE-AEBD-7942ED7AF3A3@xxxxxxxxxxxxx>
| X-Newsreader: Forte Agent 2.0/32.652
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 21
| NNTP-Posting-Host: 69.137.71.225
| X-Trace:
sv3-adqGpeoGmhDDgmTv1+mHE3QzJjsbKHGA0YanckV+sUpOZ2sdLt8OmviM9pfiRjuOXSUYdtFK
tZlNwD9!NO+LHmQaeH5ZCx83oN2WbvMdjnUEI1wWcGsNnz8ZktAlQKGvWxeegGuRNXSHpDaClBSg
lM/BzNpi!LF507AX/gtlkW6p07w==
| X-Complaints-To: abuse@xxxxxxxxxxx
| X-DMCA-Complaints-To: dmca@xxxxxxxxxxx
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!ne
wsfeed1.ip.tiscali.net!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!lo
cal01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:118025
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Running the code objXMLDoc.Load(Request.InputStream) returns the
| error: convert from 'System.IO.Stream' to 'string'. I've added
| '.ToString()', but that results in just the text string
| 'System.Web.HttpInputStream', and not the actual XML.
|
|
|
| On Sun, 14 Aug 2005 07:15:03 -0700, "Saravanan K V"
| <SaravananKV@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
|
| :Hi,
| :
| :In ASP.Net, you can use the System.XML.XmlDocument object for working on
the
| :xml instead of the MSXML.
| :
| :code snippet for loading the xml from the request:
| :
| :System.XML.XmlDocument xDoc = new System.XML.XmlDocument();
| :xDoc.Load(Request.InputStream);
| ://Now, manupulate the xDoc
|
|
.
- Follow-Ups:
- Re: Retrieving values from HTTP POST
- From: RHPT
- Re: Retrieving values from HTTP POST
- From: John Smith
- Re: Retrieving values from HTTP POST
- References:
- Retrieving values from HTTP POST
- From: RHPT
- RE: Retrieving values from HTTP POST
- From: Saravanan K V
- Re: Retrieving values from HTTP POST
- From: John Smith
- Retrieving values from HTTP POST
- Prev by Date: Re: MailMessage question
- Next by Date: writing to a unc share
- Previous by thread: Re: Retrieving values from HTTP POST
- Next by thread: Re: Retrieving values from HTTP POST
- Index(es):
Relevant Pages
|