System.Net.IWebProxy Interface

Assembly: System.dll
Namespace: System.Net
Summary
Provides the base interface for implementation of proxy access for the WebRequest class.
C# Syntax:
public interface IWebProxy
Remarks
The IWebProxy interface provides the methods and properties required by the WebRequest class to access proxy servers.

The WebProxy class is the base implementation of the IWebProxy interface.



Notes to implementors: The IWebProxy.GetProxy method can be used to control proxy use based on the destination URI. Use the IWebProxy.IsBypassed method to indicate that the proxy should not be used to reach the destination server.
See also:
System.Net Namespace

System.Net.IWebProxy Member List:

Public Properties
Credentials Read-write

The credentials to submit to the proxy server for authentication.
Public Methods
GetProxy Returns the URI of a proxy.
IsBypassed Indicates that the proxy should not be used for the specified host.

System.Net.IWebProxy Member Details

Property: Credentials (read-write)
Summary
The credentials to submit to the proxy server for authentication.
C# Syntax:
ICredentials Credentials {get; set;}
Remarks
The IWebProxy.Credentials property is an ICredentials instance containing the authorization credentials to send to the proxy server in response to an HTTP 407 (proxy authorization) status code.

Return to top


Method: GetProxy(
   Uri destination
)
Summary
Returns the URI of a proxy.
C# Syntax:
Uri GetProxy(
   Uri destination
);
Parameters:

destination

A Uri specifying the requested Internet resource.

Return Value:
A Uri containing the URI of the proxy used to contact destination.
Remarks
The IWebProxy.GetProxy method returns the URI of the proxy server that handles requests to the Internet resource specified in the destination parameter.

Return to top


Method: IsBypassed(
   Uri host
)
Summary
Indicates that the proxy should not be used for the specified host.
C# Syntax:
bool IsBypassed(
   Uri host
);
Parameters:

host

The Uri of the host to check for proxy use.

Return Value:
true if the proxy server should not be used for host; otherwise, false.
Remarks
The IWebProxy.IsBypassed method indicates whether to use the proxy server to access the host specified in the host parameter. If IWebProxy.IsBypassed is true, the proxy is not used to contact the host and the request is passed directly to the server.

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.