You can specify a level of trust that corresponds to a predefined set
of permissions for ASP.NET applications. By default, ASP.NET defines
the following trust levels:
- Full
- High
- Medium
- Low
- Minimal
With the exception of the
Full trust level, all
trust levels grant only partial trust to the application folder of a
virtual server instance. For more information on the ASP.NET trust
levels, see
Code Access Security for ASP.NET.
Additionally, Windows SharePoint Services defines two trust levels of its own:
The trust levels extend the
Minimal and
Medium
trust levels of ASP.NET for Windows SharePoint Services. The trust
levels are defined in security policy files, wss_minimaltrust.config and
wss_mediumtrust.config. By default, Windows SharePoint Services stores
these files in the following location:
local_drive:\Program Files\Common Files\Microsoft Shared\web server extensions\60\config
By default, when you extend a virtual server with Windows SharePoint
Services, Windows SharePoint Services sets the trust level to
WSS_Minimal.
This helps provide a secure trust level in which assemblies operate
with the smallest set of permissions required for code to execute.
The following table outlines the specific permissions granted with
the custom security policy files included with Windows SharePoint
Services.
| Permission | WSS_Medium trust level | WSS_Minimal trust level |
| AspNetHostingPermission | Medium | Minimal |
| Environment | Read: TEMP, TMP, OS, USERNAME, COMPUTERNAME |
|
| FileIO | Read, Write, Append, PathDiscovery:Application Directory | |
| IsolatedStorage | AssemblyIsolationByUser, Unrestricted UserQuota | |
| Reflection | | |
| Registry | | |
| Security | Execution, Assertion, ControlPrincipal, ControlThread, RemotingConfiguration | Execution |
| Socket | | |
| WebPermission | Connect to origin host (if configured) | |
| DNS | Unrestricted | |
| Printing | Default printing | |
| OleDBPermission | | |
| SqlClientPermission | AllowBlankPassword=false | |
| EventLog | | |
| Message Queue | | |
| Service Controller | | |
| Performance Counters | | |
| Directory Service | | |
| SharePointPermission | ObjectModel = true | |
| WebPartPermission | Connections = true | Connections = true |
Note By default, Windows SharePoint
Services does not grant access to the Microsoft SharePoint object model.
To grant access, you must raise the associated trust level by one of
several methods. The next section discusses these methods.