Thursday, November 10, 2011

ASP.NET and SharePoint Security Policies

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:
  • WSS_Minimal
  • WSS_Medium
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.
PermissionWSS_Medium trust levelWSS_Minimal trust level
AspNetHostingPermissionMediumMinimal
EnvironmentRead: TEMP, TMP, OS, USERNAME, COMPUTERNAME
FileIORead, Write, Append, PathDiscovery:Application Directory    
IsolatedStorageAssemblyIsolationByUser, Unrestricted UserQuota   
Reflection      
Registry      
SecurityExecution, Assertion, ControlPrincipal, ControlThread, RemotingConfigurationExecution
Socket      
WebPermissionConnect to origin host (if configured)   
DNSUnrestricted   
PrintingDefault printing   
OleDBPermission      
SqlClientPermissionAllowBlankPassword=false   
EventLog      
Message Queue      
Service Controller      
Performance Counters      
Directory Service
SharePointPermissionObjectModel = true
WebPartPermissionConnections = trueConnections = 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.

No comments:

Post a Comment

Thank you for Commenting Will reply soon ......

Featured Posts

The Code 39 error occurs when Windows is unable to load the device driver for a specific hardware device. This typically indicates that the driver is corrupted, missing, or incompatible

The Code 39 error occurs when Windows is unable to load the device driver for a specific hardware device. This typically indicates that the...