By default, the "security" permission set that is applied to the internet zone does not allow calls to unmanaged code, So you need to adjust trust level of your app (and any .dlls you made with it) using .NET Framework Configuration Tool.
Try to config .Net framework permission set to "Full Access" on the Runtime Security Policy --> Machine --> Code Groups -->All_Code --> Right-click the appropriate code group and select Properties.-> Click the Permission Set tab. -> Associate FullTrust permission
set to code group from the drop-down list and click OK.</div>
Hope it helps
Best Regards
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
XiaoYong Dai...
All-Star
38310 Points
4229 Posts
Re: ‘System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561...
May 13, 2008 07:07 AM|LINK
Hi
<div>By default, the "security" permission set that is applied to the internet zone does not allow calls to unmanaged code, So you need to adjust trust level of your app (and any .dlls you made with it) using .NET Framework Configuration Tool.
Try to config .Net framework permission set to "Full Access" on the Runtime Security Policy --> Machine --> Code Groups -->All_Code --> Right-click the appropriate code group and select Properties.-> Click the Permission Set tab. -> Associate FullTrust permission set to code group from the drop-down list and click OK.</div>Hope it helps
XiaoYong Dai
Microsoft Online Community Support
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.