echo ""; echo ""; echo ""; echo ""; if(!is_admin){echo "";} » ASP.NET网站内配置代理 仲子说

2010-10-22

ASP.NET网站内配置代理

Posted in .NET at 14:33 Author:仲远

标签:

???ASP.NET????????????????????feeds????????????Debug????????Release??????????????????????????????????????????????????????????????????????????????ASP.NET???????????????

??????

(1)??????

WebProxy proxyObject = new WebProxy(“http://proxyserver:80/”,true);
WebRequest req = WebRequest.Create(“http://www.example.com”);
req.Proxy = proxyObject;

(2)?Web.config????????

<configuration>
  <system.net>
    <defaultProxy>
      <proxy
        usesystemdefaults=”true”
        proxyaddress=”http://192.168.1.10:3128
        bypassonlocal=”true”
      />
      <bypasslist
        <add address=”[a-z]+\.contoso\.com” />
      </bypasslist>
    </defaultProxy>
  </system.net>
</configuration>

本文可以自由转载,转载时请保留全文并注明出处:
转载自仲子说 [ http://www.wangzhongyuan.com/ ]
原文链接:

3 Comments »

  1. 双s减肥药 said,

    2010年October22日 at 17:14

    谢谢分享,学习了。不过不是很懂。

  2. 如何开发右脑 said,

    2010年October22日 at 17:15

    说的很专业,谢谢了。

  3. 英语音标发音学习 said,

    2010年October22日 at 17:19

    谢谢分享,说的不错!

Leave a Comment

*
To prove you're a person (not a spam script), type the security text shown in the picture. Click here to regenerate some new text.
Click to hear an audio file of the anti-spam word