This documentation is archived and is not being maintained.

GlobalProxySelection.GetEmptyWebProxy Method

Returns an empty proxy instance.

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

Return Value

An IWebProxy that contains no information.


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


[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("")
myReq.Proxy = GlobalProxySelection.GetEmptyWebProxy()

WebRequest myReq = WebRequest.Create("");
myReq.Proxy = GlobalProxySelection.GetEmptyWebProxy();

WebRequest* myReq = WebRequest::Create(S"");
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.


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