The WebPermission class belongs to the System.Net namespace described on the Microsoft Web site. Table A-16 shows the required WebPermission setting for features and functions in .NET targets.
Function or feature |
Permission required |
---|---|
GetURL (Inet function) |
Connect for urlname argument |
PostURL (Inet function) |
Connect for urlname and serverport arguments |
Web Service call feature |
Unrestricted=“true” |
The following permission setting allows a Windows Forms application to connect to the Sybase Web site:
<IPermission class="System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1"> <ConnectAccess>
<URI uri="http://www.sybase.com"/> </ConnectAccess>
</IPermission>
The following permission setting allows a Web Forms application to connect to a remote host:
<IPermission class="WebPermission" version="1"> <ConnectAccess>
<URI uri="$OriginHost$"/>
</ConnectAccess>
</IPermission>