This documentation is archived and is not being maintained.

SocketPermissionAttribute.Host Property

Gets or sets the DNS host name or IP address specified by this SocketPermissionAttribute.

[Visual Basic]
Public Property Host As String
public string Host {get; set;}
public: __property String* get_Host();
public: __property void set_Host(String*);
public function get Host() : String;
public function set Host(String);

Property Value

A string containing the DNS host name or IP address associated with this instance of SocketPermissionAttribute.


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


This property is write-once and specifies the Domain Name Services (DNS) host name to which this permission applies.


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