context.Request.Form {%3cxml%3e%3cdiv%3eaa%3c%2fdiv%3e%3c%2fxml%3e}有办法处理没?格式虽然不规范,希望那位老大指点下。或者其它方法收这个数据。POST '<xml><div>aa</div></xml>'

解决方案 »

  1.   

    xml字符串和其他字符串相同啊
      

  2.   

    context.Request.Form
    读取 错误。没明白啊。POST /Post/Post_User.ashx HTTP/1.1
    Host: localhost:13239
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.9.2.11) Gecko/20101012 Firefox/3.6.11
    Accept: application/xml, text/xml, */*
    Accept-Language: zh-cn,zh;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: GB2312,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Content-Type: application/x-www-form-urlencoded; charset=UTF-8
    X-Requested-With: XMLHttpRequest
    Referer: http://localhost:13239/Test/WebForm1.aspx
    Content-Length: 24
    Pragma: no-cache
    Cache-Control: no-cache<xml><div>aa</div></xml>
    实际的包
      

  3.   

     string _str = context.Request.Form.Count.ToString();//调试后 _str = 1怎么就读不了呢?