This documentation is archived and is not being maintained.

WebPermission.AcceptList Property

This property returns an enumeration of a single accept 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 AcceptList As IEnumerator
public IEnumerator AcceptList {get;}
public: __property IEnumerator* get_AcceptList();
public function get AcceptList() : IEnumerator;

Property Value

The IEnumerator interface containing accept permissions.


This property gets a list of local resources permitted by this WebPermission. The class to which you have applied WebPermission only has permission to receive an incoming connection to local 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 AcceptList to the console.

[Visual Basic] 
' Get all URI's with Accept permission.  
Dim myEnum1 As IEnumerator = myWebPermission1.AcceptList
Console.WriteLine(ControlChars.Cr + ControlChars.Cr + "The URIs with Accept permission are :" + ControlChars.Cr)
While myEnum1.MoveNext()
   Console.WriteLine((ControlChars.Tab + "The URI is : " + myEnum1.Current))
End While 


   // Get all URI's with Accept permission.  
   IEnumerator myEnum1 = myWebPermission1.AcceptList;
   Console.WriteLine("\n\nThe URIs with Accept permission are :\n");
while (myEnum1.MoveNext())
{ Console.WriteLine("\tThe URI is : "+myEnum1.Current); }

// Get all URI's with Accept permission.
IEnumerator* myEnum1 = myWebPermission1->AcceptList;
Console::WriteLine(S"\n\nThe URIs with Accept permission are :\n");
while (myEnum1->MoveNext()) { Console::WriteLine(S"\tThe URI is : {0}", myEnum1->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