Re: WebProxy with System.Net.WebClient

From: Joerg Jooss (news-reply_at_joergjooss.de)
Date: 09/24/05

  • Next message: Joerg Jooss: "Re: WebProxy with System.Net.WebClient"
    Date: Sat, 24 Sep 2005 09:36:43 -0700
    
    

    Shahid wrote:

    > hi,
    >
    > i m trying to get html from a website using asp.net. i wrote
    > following code to access html of a website. it works fine but
    > whenever i try this code from network (behind proxy server) , it
    > gives me error " The underlying connection was closed: Unable to
    > connect to the remote server". i don't know how to implement proxy
    > class with in WebClient Class.

    Prior to .NET 2.0, WebClient does not expose a Proxy property like
    HttpWebRequest does.

    There's one work-around you might want to try: Before creating your
    WebClient, create a WebProxy instance for your specific proxy server
    and set it as default by calling GlobalProxySelection.Select =
    yourProxy;

    If that doesn't work, you have to use HttpWebRequest instead.

    Cheers,

    -- 
    http://www.joergjooss.de
    mailto:news-reply@joergjooss.de
    

  • Next message: Joerg Jooss: "Re: WebProxy with System.Net.WebClient"

    Relevant Pages

    • Re: How to use proxies and surf safe
      ... There are anonymous proxies, and transparent proxies, ... > and you want to choose an anonymous proxy that totally masks your IP ... > from the website which you connect to. ... > more anonymous (though the real test of anonymity is whether the proxy ...
      (alt.computer.security)
    • RE: tcp/udp proxy tool
      ... You can download it from: ... I wonder if you know any tool similar to Paros Proxy but for TCP/UDP. ... Audit your website security with Acunetix Web Vulnerability Scanner: ... Up to 75% of cyber attacks are launched on shopping carts, forms, ...
      (Pen-Test)
    • How to use proxies and surf safe
      ... you need to connect through a proxy. ... from the website which you connect to. ... If you're on a dialup connection go to Tools/Internet ... which encrypts your packets so ...
      (alt.computer.security)
    • NTLM/Browser Storing Any Sessions ??
      ... Right now we have a proxy server which has enabled NTLM Autentication ... Enabled for all Internet Website. ... Authentication Prompt(it could be the server has been enabled with the ...
      (microsoft.public.inetserver.iis.ftp)
    • Re: AW: help with network problem
      ... I dont use proxy on this box. ... Irene ... >(Only that website so far). ...
      (Security-Basics)