代码:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace shy
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
WebClient a = new WebClient();
string c = "http://patft.uspto.gov/netacgi/nph-Parser?";
string b = a.DownloadString(c);
MessageBox.Show(b);
}运行后出现错误为:服务器提交了协议冲突. Section=ResponseStatusLine为什么?
请高手指导
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace shy
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
WebClient a = new WebClient();
string c = "http://patft.uspto.gov/netacgi/nph-Parser?";
string b = a.DownloadString(c);
MessageBox.Show(b);
}运行后出现错误为:服务器提交了协议冲突. Section=ResponseStatusLine为什么?
请高手指导
解决方案 »
- 安装包 自定义用户操作 出错了 高手帮忙看看
- 一个xml文件操作的问题
- winform中使用WEBBROWSER的问题
- 关于C# DataTable
- TFS 下工程添加后无法CHECK IN的问题!!标题要长!!分数要多!!
- 用过Infragistics NetAdvantage 2005 Volume 这个.NET控件既高手进来一下
- c#web中session和ViewState的区别在那
- 有谁知道西安葡萄城软件公司的待遇如何?急急急急急急急急急急急急
- 推荐一个 XP 样式菜单控件!
- 有谁研究过微软.net中的例子:Duwamish这个例子,急急!!!!
- 关于WAP转向问题
- remoting中server段怎样获取客户端的ip地址?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Windows.Forms;
using System.Net;
namespace shy
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
WebClient a = new WebClient();
string c = "http://patft.uspto.gov/netacgi/nph-Parser?";
string b = a.DownloadString(c);
MessageBox.Show(b);
}
}
}
我试了试,用浏览器能返回信息,用webbrowse能得到信息,但效率低,不能用多线程处理用HttpWebReuqest 和 HttpWebResponse 出现同样错误
用a.DownloadData(c); 出现同样错误