|
你好,我用你的httpHelper类登录一个网址:
http://116.236.176.205/ipac20/ipac.jsp?session=13Q29P049181E.90308&profile=pdlib&auth=true&submenu=basic&date=1382940209752#focus
我获取到这个页面的表单地址,构造了需要Post的数据,
session=13Q29P049181E.90308&menu=home&aspect=basic&npp=10&ipp=20&profile=pdlib&ri=&button=登录&login_prompt=true&lastlogin=1382940502737&sec1=246965&sec2=1234567890,
我调用的代码如下:
string t_login_form_url = string.Empty;
string t_login_post_data = BuilderPostData(result, i_reader_no, i_body_card, out t_login_form_url);
HttpItem t_login_item = new HttpItem();
t_login_item.URL = t_login_form_url;
t_login_item.Postdata = t_login_post_data;
t_login_item.Method = "POST";
t_login_item.IsToLower = false;
t_login_item.ResultType = ResultType.String;
httpResult = httpHelper.GetHtml(t_login_item);
其中URL赋值为:http://116.236.176.205/ipac20/ipac.jsp,Postdata赋值为:session=13Q29P049181E.90308&menu=home&aspect=basic&npp=10&ipp=20&profile=pdlib&ri=&button=登录&login_prompt=true&lastlogin=1382940502737&sec1=246965&sec2=1234567890
始终会返回:
<html><body><h2>Invalid request</h2><a href="/ipac20/ipac.jsp?profile=pdlib">Click here</a></body></html>
在页面上用:246965/1234567890能成功登录,能抽空帮忙看看吗?
|
|