This documentation is archived and is not being maintained.

WebPermission.ConnectList Property

This property returns an enumeration of a single connect permissions held by this WebPermission. The possible objects types contained in the returned enumeration are String and System.Text.RegularExpressions.Regex.

[Visual Basic]
Public ReadOnly Property ConnectList As IEnumerator
public IEnumerator ConnectList {get;}
public: __property IEnumerator* get_ConnectList();
public function get ConnectList() : IEnumerator;

Property Value

The IEnumerator interface containing connect permissions.


This property gets a list of remote resources permitted by this WebPermission. The class to which you have applied WebPermission only has permission to connect with resources found in this list.

Note   You can add URIs to this list using AddPermission.


[Visual Basic, C#, C++] The following example prints the URL's in the ConnectList to the console.

[Visual Basic] 
' Gets all URIs with Connect permission.
Dim myEnum As IEnumerator = myWebPermission1.ConnectList
Console.WriteLine(ControlChars.Cr + "The URIs with Connect permission are :" + ControlChars.Cr)
While myEnum.MoveNext()
   Console.WriteLine((ControlChars.Tab + "The URI is : " + myEnum.Current))
End While 


// Gets all URIs with Connect permission.
IEnumerator myEnum = myWebPermission1.ConnectList;
Console.WriteLine("\nThe URIs with Connect permission are :\n");
while (myEnum.MoveNext())
{ Console.WriteLine("\tThe URI is : "+myEnum.Current); }

// Gets all URIs with Connect permission.
IEnumerator* myEnum = myWebPermission1->ConnectList;
Console::WriteLine(S"\nThe URIs with Connect permission are :\n");
while (myEnum->MoveNext()) { Console::WriteLine(S"\tThe URI is : {0}", myEnum->Current); }

[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

See Also

WebPermission Class | WebPermission Members | System.Net Namespace | AddPermission