首页 新闻 会员 周边 捐助

.NET如何获取未带参数的POST数据

0
悬赏园豆:30 [待解决问题]

服务商向我post 一段 xml 数据,要求我们的aspx页面有接收处理能力,post 内容如下:

 

<?xml version="1.0" encoding="gb2312" ?>
<cuelist xmlns="urn:CueListSchema.xml" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:s="urn:schemas-rcsworks-com:SongSchema" xmlns:n="urn:schemas-rcsworks-com:NoteSchema" xmlns:l="urn:schemas-rcsworks-com:LinkSchema" xmlns:t="urn:schemas-rcsworks-com:TrafficSchema" xmlns:p="urn:schemas-rcsworks-com:ProductSchema" xmlns:m="urn:schemas-rcsworks-com:MediaSchema" xmlns:w="urn:schemas-rcsworks-com:WebPageSchema" sequencermode="automation" sequenceroverunder="29.62" sequencernextetm="15:00:00" sequencermachine="NJ-AIRM" time="2014-07-29T14:30:27">
<Event eventID="6" eventType="song" elementSpecificData="0" status="happening" timing="none" startOffset="0.00" scheduledTime="14:30:27" scheduledDuration="229.00" segue="xfade" failureCode="0" editCode="0" outputChannel="B">
<s:Song title="破吉他" ID="HQ04954" internalID="007700008011C9F80000" category="P" level="1" packet="0" percentBack="100" dateAdded="2013-07-04" opening="" ending="" alternatePacket="0" alternatePercentBack="100" isCompleteWork="0" lastPlayDate="2014-07-29" lastPlayTime="14:30:26" lastEditedDate="2014-07-28" enteredCategory="2013-12-30" playsInCategory="130" totalPlays="760" maintenanceFlag="0" comment="">
<s:SongAdditional additionalArtists="" composers="" publisher="" lyricist="" isrc="" arranger="" license="" label="" recordNumber="" promoter="" country="" content="NO" address="" radioText="" barcode=""/>
<s:Artist name="张震岳" country="" sequenceNumber="1" internalID="00670001800006520000" sortName="张震岳"/>
012-1A59-4EC8-9D6A-237C54A20329}" runTime="229.41" intro1="" intro2="" intro3="20.86" fileName="{07681012-1A59-4EC8-9D6A-237C54A20329}.wav" hookStart="73.35" hookEnd="116.56" trimStart="0.00" trimEnd="230.98" totalTime="230.98" linkOverLapNTP=""/></s:Song>
</Event></cuelist>

对方只告诉我已经将数据post 到我提供的一个url上了( http://www.abc.com/Receive.aspx),我的接收文件Receive.aspx 该如何写才能获得这一段xml数据

Sunaz的主页 Sunaz | 初学一级 | 园豆:169
提问于:2014-07-31 16:06
< >
分享
所有回答(2)
0

Request.Form[null],这样就能获取到了~

幻天芒 | 园豆:37207 (高人七级) | 2014-07-31 16:13

长知识了~

支持(0) 反对(0) 刘宏玺 | 园豆:14020 (专家六级) | 2014-08-01 10:55

@刘宏玺: :)

支持(0) 反对(0) 幻天芒 | 园豆:37207 (高人七级) | 2014-08-01 19:52

取不到的

 

支持(0) 反对(0) Sunaz | 园豆:169 (初学一级) | 2014-08-03 16:02

@Sunaz: 你可以在请求处理里面断点,然后看看这个值对应的key。

支持(0) 反对(0) 幻天芒 | 园豆:37207 (高人七级) | 2014-08-03 17:57
0

StreamReader stream = new System.IO.StreamReader(Request.InputStream);
                string xml = stream.ReadToEnd();

forhells | 园豆:724 (小虾三级) | 2014-08-05 19:39

很好,这个才是正确的想法~~~非常感谢!!!

支持(0) 反对(0) 小夜1 | 园豆:193 (初学一级) | 2014-12-10 09:53
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册