RE: Trying to run in partial trust (getting a PolicyException)



Hello Dave,

From your description, you have changed the trust level of your ASP.NET web
application(to partial trust) and now you'll encounter .net CAS permission
error when try running the application ,correct?

Based on the exception callstack and message you provided, the problem is
caused by the following assembly:

==============
Could not load file or assembly 'WindwardReports,
Version=4.1.35.0, Culture=neutral, PublicKeyToken=34ffe15f4bbb8e53' or one
of
its dependencies.
==============

The minimal requested permissions are violating the host environment's
trust level. I think you can check the permission through the following two
steps:

** Verify your current ASP.NET application's trust level(high or medium
or...) and find that level's policy file(in framework's config folder
----C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG) and verify
whether that assembly contains any code that violate the CAS permissionset
allowed in that policy.

** for assembly, .net 2.0 provide the permcalc.exe tool which can help
verify the minimum permission sandbox in which an application can run.


#Permission Calculator Tool (Permcalc.exe)
http://msdn2.microsoft.com/en-us/library/ms165077(VS.80).aspx


e.g.

Permcalc.exe -sandbox mylib.dll

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

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.






.



Relevant Pages

  • Re: AddIn wont load
    ... we can set a specified key's permission to denying everyone to access. ... level privilege is also required to access all registry keys in the HKLM, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.office.developer.com.add_ins)
  • Re: Search from asxp page not working
    ... Please further check the permission of the problematic catalog's ... Everyone group with Read permission on it and restart indexing service. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.inetserver.indexserver)
  • Re: Search from asxp page not working
    ... Everyone group with Read permission on it and restart indexing service. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.inetserver.indexserver)
  • Re: assembly doesn permit partially trustets calls
    ... To mitigate the risk, think very carefully about the permissions that you assign to the application running on the file share so that it permits exactly and only the request to satisfy the permission demand, block everything else. ... we can give all the assemblies in the ... Microsoft Online Community Support ...
    (microsoft.public.dotnet.framework)
  • Re: Pause in Start-up After Desktop and TaskBar...
    ... You can access Event Viewer by selecting Start, Control Panel, ... see Help and Support Center at ... The application-specific permission settings do not grant Local Launch ... RSM could not load media in drive Drive 0 of library Kingston DataTraveler ...
    (microsoft.public.windowsxp.perform_maintain)