The SocketPermission class belongs to the System.Net namespace described on the Microsoft Web site. Table A-14 shows the required SocketPermission setting for the ConnectToServer Connection object function in .NET targets.
Connection object function |
Permission required |
---|---|
ConnectToServer |
Connect |
The following permission setting allows a Windows Forms application to get or set a network access method:
<IPermission class="System.Net.SocketPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1"> <ConnectAccess>
<ENDPOINT host="10.42.144.40" transport="Tcp" port="2000"/> </ConnectAccess> </IPermission>
The following permission setting alllows a Web Forms application to get or set a network access :
<IPermission class="SocketPermission" version="1"> <ConnectAccess> <ENDPOINT host="10.42.144.40" transport="Tcp" port="2000"/> </ConnectAccess> </IPermission>