Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

GlobalProxySelection.GetEmptyWebProxy Method

Returns an empty proxy instance.

[Visual Basic]
Public Shared Function GetEmptyWebProxy() As IWebProxy
[C#]
public static IWebProxy GetEmptyWebProxy();
[C++]
public: static IWebProxy* GetEmptyWebProxy();
[JScript]
public static function GetEmptyWebProxy() : IWebProxy;

Return Value

An IWebProxy that contains no information.

Remarks

The GetEmptyWebProxy method returns a blank IWebProxy instance to indicate that no proxy is used to access an Internet resource.

Example

[Visual Basic, C#, C++] The following example creates a WebRequest instance that does not use a proxy to contact an Internet resource.

[Visual Basic] 
Dim myReq As WebRequest = WebRequest.Create("http://www.contoso.com/")
myReq.Proxy = GlobalProxySelection.GetEmptyWebProxy()

[C#] 
WebRequest myReq = WebRequest.Create("http://www.contoso.com/");
myReq.Proxy = GlobalProxySelection.GetEmptyWebProxy();


[C++] 
WebRequest* myReq = WebRequest::Create(S"http://www.contoso.com/");
myReq->Proxy = GlobalProxySelection::GetEmptyWebProxy();

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

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

GlobalProxySelection Class | GlobalProxySelection Members | System.Net Namespace

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.