RE: Trying to run in partial trust (getting a PolicyException)
- From: David Thielen <thielen@xxxxxxxxxxxxx>
- Date: Tue, 7 Nov 2006 09:15:02 -0800
It's the output from Permcalc.exe -sandbox mylib.dll
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Dominick Baier" wrote:
where does <Sandbox> come from?.
---
Dominick Baier, DevelopMentor
http://www.leastprivilege.com
Ok, this is what I got. How do I find out which are a problem in a
partially trusted system?
<Sandbox>
<PermissionSet version="1" class="System.Security.PermissionSet">
<IPermission version="1"
class="System.Security.Permissions.EnvironmentPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
<IPermission version="1"
class="System.Security.Permissions.FileIOPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
<IPermission version="1"
class="System.Security.Permissions.ReflectionPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Flags="MemberAccess" />
<IPermission version="1"
class="System.Security.Permissions.RegistryPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
<IPermission version="1"
class="System.Security.Permissions.SecurityPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Flags="UnmanagedCode, Execution, ControlThread, ControlEvidence" />
<IPermission Window="SafeSubWindows" Clipboard="OwnClipboard"
version="1" class="System.Security.Permissions.UIPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<IPermission version="1"
class="System.Security.Permissions.KeyContainerPermission, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
<IPermission version="1" class="System.Net.SocketPermission,
System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
<IPermission version="1" class="System.Net.DnsPermission, System,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
Unrestricted="true" />
</PermissionSet>
</Sandbox>
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
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.asp
x#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.
- Follow-Ups:
- RE: Trying to run in partial trust (getting a PolicyException)
- From: Dominick Baier
- RE: Trying to run in partial trust (getting a PolicyException)
- References:
- Trying to run in partial trust (getting a PolicyException)
- From: David Thielen
- RE: Trying to run in partial trust (getting a PolicyException)
- From: Steven Cheng[MSFT]
- RE: Trying to run in partial trust (getting a PolicyException)
- From: David Thielen
- RE: Trying to run in partial trust (getting a PolicyException)
- From: Dominick Baier
- Trying to run in partial trust (getting a PolicyException)
- Prev by Date: Re: RoleProvider for AD Group membership
- Next by Date: Using forms authentication and ASPNetWindowsTokenRoleProvider
- Previous by thread: RE: Trying to run in partial trust (getting a PolicyException)
- Next by thread: RE: Trying to run in partial trust (getting a PolicyException)
- Index(es):
Relevant Pages
|