Hi Jerry,
When you got this error message, do you get any other detailed exception
information? For example, do you have the stack trace of this unhandled
exception? This will help to reveal the root cause of this problem.
This issue looks like a .Net Code Access Security problem. Based on the
exception, certain assembly in this application does not have the
'System.Net.WebPermission', which is checked by the .Net.
If this is a .Net CAS problem, you may first give a permission set
evaluation to your assembly. You can open ".Net Framework 2.0
Configuration" tool from "Administrative tools" in Control Panel. Click
"Runtime Security Policy" node the left panel. Then click "Evaluate
Assembly" link in the right panel.
In the popup dialog, input your assembly path, and click next to evaluate
your assembly permission set. Normally, it should be "Unrestricted" which
means it is fully trusted. However, in your scenario, I suspect your
assembly has limited permission set.
Once you have determined that your assemly really lacks the WebPermission,
you may create a code group in above tool for your assembly and then adding
WebPermission for this code group. See the article below to understand how
to add code group and permission set:
"Understanding .NET Code Access Security"
http://www.codeproject.com/dotnet/UB_CAS_NET.asp
If you still have problem, please feel free to feedback, thanks.
Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.