Error with XBox Lab application

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying WPF programming for the first time and using the XBox lab. When I
deploy the lab and run I get the error

System.Security.SecurityException: Request for the permission of type
'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' failed.

There is only one Dll in the lab could this be the problem. how do I solve
this in a wpf app that is deployed on iis6

Thank you

Jerry
 
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.
 
Hi Jerry,

Have you reviewed my reply to you? Does it make sense to you? If you still
need any help or have any concern, 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.
 
Jeffery,

Thank you for your reply. I looked at the dlls and they had Unrestricted so
that was not the problem. I removed the dll and coded around its function.
and the site worked but when I tried it in firefox and safari it would not
down load maybe I need to wait until the silverlight. Since my users use
these browsers I have to drop the WPF project for now.

Thank you for your help.
 
Hi Jerry,

Thank you for confirming the issue status. Ok, if you need further help,
please feel free to post, 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.
 
Back
Top