| 
 
积分40186好友记录主题帖子听众收听 
 | 
 
| 小小程序员() 11:06:51 我的代码:string url = "http://192.168.0.184/cgi-bin/wagent?webipcinfo+list";
 HttpHelper httpHelper = new HttpHelper();
 HttpItem item=new HttpItem ();
 item.URL=url ;
 item.ResultType = ResultType.String;
 HttpResult r = httpHelper.GetHtml(item);
 
 小小程序员() 11:07:20
 它提示:服务器提交了协议冲突. Section=ResponseHeader Detail=标头名称无效
 
 PerkySu() 11:08:13
 ContentType = "text/html"这个参数没有设置
 
 PerkySu() 11:09:05
 要返回什么样的数据要写成什么样的头信息的。
 
 PerkySu() 11:09:09
 http://www.sufeinet.com/thread-1866-1-1.html
 
 小小程序员() 11:10:13
 设置了也不行
 
 小小程序员() 11:10:57
 还是提示:服务器提交了协议冲突. Section=ResponseHeader Detail=标头名称无效
 
 
 PerkySu() 11:12:52
 myRequest.ContentType = "application/x-www-form-urlencoded";
 
 PerkySu() 11:13:04
 item.ContentType = "application/x-www-form-urlencoded"
 
 PerkySu() 11:13:45
 [code=csharp]服务器提交了协议冲突.Section=ResponseHeader Detail=CR 后面必须是LF.
 
 微软没有容忍不符合RFC 822中的httpHeader必须以CRLF结束的规定的服务器响应所导致.
 
 解决方案分别是在web.config配置
 
 <system.net>
 <settings>
 <httpWebRequest useUnsafeHeaderParsing=”true” />
 </settings>
 </system.net>
 [/code]
 
 PerkySu() 11:14:13
 我建议你去看看Httphelper原理再写,要不然你的问题让我很头疼。
 
 PerkySu() 11:14:20
 问的很另类
 
 小小程序员() 11:14:26
 
  
 小小程序员() 11:17:44
 在Config中配置下,可以了
 
 小小程序员() 11:17:55
 谢谢,老大
 
 小小程序员() 11:18:24
 苏飞你真是程序员的福音啊
 
 | 
 |