日期:2014-05-18  浏览次数:21157 次

C# HttpWebRequest 登录网页问题
现在已经能登录进去了,但是有一步重要操作,不知道该怎么弄!各位帮帮忙

截获的请求标头 如下:

POST /sd_manage/axisqb.do?method=ProxyRecv&pType=1&uuid=1d1ff5194c234306ba3a5a1005e6fb85 HTTP/1.1
Accept: */*
Accept-Language: zh-cn
Referer: http://xxxxxx.net/sd_manage/ford.jsp?ty=ty&zzjphonepwd=132428
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
Host: xxxxxx.net
Content-Length: 0
Connection: Keep-Alive
Cache-Control: no-cache
Cookie: sidi_sessionid=F7005EEAE3D47D74500704FB57DA21A6

响应标头如下:

HTTP/1.1 200 OK
Date: Wed, 20 Jun 2012 04:42:43 GMT
Server: Apache
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=utf-8

响应正文如下:
{"res":1,"axisres":1,"msg":"鍒掓嫧鎴愬姛l"}


我用 HttpWebRequest 进行操作的时候,老是返回

{"res":"no"}

不知道什么情况!
也不知道!这个到底时候Post请求 还是Get 
/sd_manage/axisqb.do?method=ProxyRecv&pType=1&uuid=1d1ff5194c234306ba3a5a1005e6fb85


------解决方案--------------------
ajax也是请求,你的程序去请求ajax的请求地址