System.Net.SocketPermission Class

Controls rights to make or accept connections on a transport address.

See Also: SocketPermission Members


public sealed class SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission


System.Net.SocketPermission instances control permission to accept connections or initiate System.Net.Sockets.Socket connections. A System.Net.Sockets.Socket permission can be established for a host name or IP address, a port number, and a transport protocol.


Avoid creating socket permissions using host names, as these names have to be resolved to IP addresses, and this might block the stack.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.


Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 1.0.x.x, 1.0.5000.0,,