This documentation is archived and is not being maintained.

WebProxy.GetProxy Method

Returns the proxied URI for a request.

[Visual Basic]
Public Overridable Function GetProxy( _
   ByVal destination As Uri _
) As Uri Implements IWebProxy.GetProxy
public virtual Uri GetProxy(
 Uri destination
public: virtual Uri* GetProxy(
 Uri* destination
public function GetProxy(
   destination : Uri
) : Uri;


The Uri of the requested Internet resource.

Return Value

The Uri of the Internet resource, if the resource is on the bypass list; otherwise, the Uri of the proxy.




The GetProxy method returns the URI that the WebRequest uses to access the Internet resource.

GetProxy compares destination with the contents of BypassList using the IsBypassed method. If IsBypassed returns true, GetProxy returns destination and the WebRequest does not use the proxy server.

If destination is not in BypassList, the WebRequest uses the proxy server, and the Address property is returned.



Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

WebProxy Class | WebProxy Members | System.Net Namespace