Export (0) Print
Expand All

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
[C#]
public virtual Uri GetProxy(
 Uri destination
);
[C++]
public: virtual Uri* GetProxy(
 Uri* destination
);
[JScript]
public function GetProxy(
   destination : Uri
) : Uri;

Parameters

destination
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.

Implements

IWebProxy.GetProxy

Remarks

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.

Example

Requirements

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

Show:
© 2014 Microsoft