Export (0) Print
Expand All

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
[C#]
public IEnumerator AcceptList {get;}
[C++]
public: __property IEnumerator* get_AcceptList();
[JScript]
public function get AcceptList() : IEnumerator;

Property Value

The IEnumerator interface containing accept permissions.

Remarks

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.

Example

[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 

[C#] 

   // 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); }


[C++] 
// 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.

Requirements

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

Show:
© 2014 Microsoft