Export (0) Print
Expand All

WebProxy Constructor (String, Boolean, String[], ICredentials)

.NET Framework 1.1

Initializes a new instance of the WebProxy class with the specified URI, bypass setting, list of URIs to bypass, and credentials.

[Visual Basic]
Public Sub New( _
   ByVal Address As String, _
   ByVal BypassOnLocal As Boolean, _
   ByVal BypassList() As String, _
   ByVal Credentials As ICredentials _
)
[C#]
public WebProxy(
   string Address,
 bool BypassOnLocal,
 string[] BypassList,
 ICredentials Credentials
);
[C++]
public: WebProxy(
   String* Address,
 bool BypassOnLocal,
 String* BypassList __gc[],
 ICredentials* Credentials
);
[JScript]
public function WebProxy(
   Address : String,
 BypassOnLocal : Boolean,
 BypassList : String[],
 Credentials : ICredentials
);

Parameters

Address
The URI of the proxy server.
BypassOnLocal
true to bypass the proxy for local addresses; otherwise, false.
BypassList
An array of regular expression strings containing the URIs of the servers to bypass.
Credentials
An ICredentials to submit to the proxy server for authentication.

Exceptions

Exception Type Condition
UriFormatException Address is an invalid URI.

Remarks

The WebProxy instance is initialized with the Address property set to a Uri instance containing Address, the BypassProxyOnLocal property set to BypassOnLocal, the BypassList property set to BypassList, and the Credentials property set to Credentials.

Requirements

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

See Also

WebProxy Class | WebProxy Members | System.Net Namespace | WebProxy Constructor Overload List | BypassProxyOnLocal | BypassList

Show:
© 2014 Microsoft