但是那边的网管已经通过我也不清楚的设定让机器能正常通过IE访问这个地址了. they add a gateway ?
解决方案 »
- 淘宝登录页面输入密码的控件是怎么做的?
- 急救站!
- 什么排序最难,是希尔排序吗?
- 能否把 Queue<string> 绑定到控件上 ??
- 用StreamWriter写文件时,win2003下运行“访问被拒绝”2000下运行正常
- 关于smartphone的开发,还有几点疑问,做过相关开发的,敬请进~
- 如何根据文件的扩展名 得到操作系统中相应的图标?
- 有没有碰到打开网站的时候说找不到页面,刷新一下就又好了呀,有时候又刷好几次
- 关于Web页中引用winform控件的问题------急
- C#编程中有没有办法将用户输入的数据存储在DLL或EXE里??
- 请问关于扫描器的效率问题
- 请教:关于UDPClient的的几个问题
try {
WebProxy proxyObject = new WebProxy(proxy, 80);
// 当主机为本地时,禁用代理,即不使用句点。
proxyObject.BypassProxyOnLocal = true;
// 实际上现在新的设置接管了全局,所有新的
// 请求都使用此代理信息
GlobalProxySelection.Select = proxyObject;
WebRequest req = WebRequest.Create(url);
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
Encoding encode = System.Text.Encoding.GetEncoding("utf-8");
StreamReader sr = new StreamReader( ReceiveStream, encode );
Console.WriteLine("\r\n已接收到响应流");
if (bShow) {
Char[] read = new Char[256];
int count = sr.Read( read, 0, 256 );
Console.WriteLine("HTML...\r\n");
while (count > 0) {
String str = new String(read, 0, count);
Console.Write(str);
count = sr.Read(read, 0, 256);
}
Console.WriteLine("");
}
} catch(Exception) {
Console.WriteLine("\r\n找不到请求 URI,或者它的格式不正确");
}
try
{
WebProxy proxyObject = new WebProxy(proxy, 80);
proxyObject.BypassProxyOnLocal = true;
GlobalProxySelection.Select = proxyObject;
...}