This documentation is archived and is not being maintained.

SocketPermissionAttribute.Access Property

Gets or sets the network access method allowed by this SocketPermissionAttribute.

[Visual Basic]
Public Property Access As String
public string Access {get; set;}
public: __property String* get_Access();
public: __property void set_Access(String*);
public function get Access() : String;
public function set Access(String);

Property Value

A string containing the network access method allowed by this instance of SocketPermissionAttribute. Valid values are "Accept" and "Connect."


Exception Type Condition
ArgumentException The Access property is not a null reference (Nothing in Visual Basic) when you attempt to set the value. To specify more than one Access method, use an additional attribute declaration statement.


This property is write-once. Valid values for this property correspond to NetworkAccess enumeration values.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

SocketPermissionAttribute Class | SocketPermissionAttribute Members | System.Net Namespace