Restrictions in SharePoint 2010 Sandboxed Solutions – Part 2
The code inside SharePoint 2010 Sandboxed Solutions is limited by code access security policy restrictions. The code access security policy for the sandboxed solution worker process is defined in the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\CONFIG\wss_usercode.config file and it is referenced in %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\UserCode.
The following permission levels are denied by code access security policy.
|
No
|
Denied Permissions
|
Impact
|
|
1
|
DirectoryServicesPermission
|
|
|
2
|
DnsPermission
|
|
|
3
|
EnvironmentPermission
|
|
|
4
|
EventLogPermission
|
|
|
5
|
FileIoPermission
|
Cannot read/write to file system
|
|
6
|
IsolatedStorageFilePermission
|
|
|
7
|
PrintingPermission
|
|
|
8
|
ReflectionPermission
|
|
|
9
|
RegistryPermission
|
|
|
10
|
SecurityPermission
|
Cannot access unmanged code, Threads, App Domains etc.
|
|
11
|
SMTPPermission
|
Cannot access .NET Reflection APIS and non-public class & members in managed code
|
|
12
|
SqlClientPermission
|
|
|
13
|
SocketPermission
|
|
|
14
|
UIPermission
|
|
|
15
|
WebPermission
|
|
The following permission levels are granted by code access security policy.
|
No
|
Granted Permissions
|
Impact
|
|
1
|
SharePointPermission.ObjectModel
|
|
|
2
|
ASPnetHostingPermission=Minimal
|
Can execute resources, but not read/write access to resources
|
|
3
|
SecurityPermission.Execution
|
|
This completes the final part (Part 2) of the article 'Restrictions in SharePoint 2010 Sandboxed Solutions'.
Subscribe to my blog