Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Error with XBox Lab application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jerry C - 15 Jun 2007 21:12 GMT
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
Signature

Jerry

Jeffrey Tan[MSFT] - 18 Jun 2007 07:37 GMT
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.
Jeffrey Tan[MSFT] - 20 Jun 2007 03:59 GMT
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.
Jerry C - 20 Jun 2007 19:22 GMT
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.

Signature

Jerry

> Hi Jerry,
>
[quoted text clipped - 22 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Jeffrey Tan[MSFT] - 21 Jun 2007 03:08 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.