I created a simple "Hello World" sandbox webpart in VS.NET 2010. After uploading the .wsp file to SharePoint site, I activated the webpart. But while trying to add it to a page, I was getting this error
"The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request.
"
Following is my SharePoint dev box(Dell XPS laptop) configuration
- Windows Server 2008 R2
- The machine is configured to run as a Domain Controller
- SQL Server 2008 SP2
- SharePoint 2010 Enterprise Edition
- The SharePoint services are running under a domain user account.
- Firewalls policies set to allow inbound\outbound for all networks. Later I disabled the firewall completely.
- Formatted and re-installed machine with a fresh SP2010 installation
- My development machine is a standalone one without internet connectivity.
I tried out the following steps which I came to find in some blogs and articles, even after implementing the solutions the problem persists. Here are the steps what I did to sort this out.
Made sure the "SharePoint 2010 User Code host" is started under Windows Service.
In Central Admin, the Sandbox solution is started. (I verified this each time after restart)
Executed the following powershell script, as I was running Sp2010 inside a Domain Controller.
$acl = Get-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $person = [System.Security.Principal.NTAccount]“Users” $access = [System.Security.AccessControl.RegistryRights]::FullControl $inheritance = [System.Security.AccessControl.InheritanceFlags]“ContainerInherit,ObjectInherit” $propagation = [System.Security.AccessControl.PropagationFlags]::None $type = [System.Security.AccessControl.AccessControlType]::Allow $rule = New-Object System.Security.AccessControl.RegistryAccessRule($person, $access,$inheritance, $propagation, $type) $acl.AddAccessRule($rule) Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl
Next I tried out all the solutions mentioned in this link. Like registry, hosts file etc. But while trying out the following solution "generatePublisherEvidence enabled="false"" mentioned in the article the sandbox services itself started to crash. So i reverted those change.
After each try, I restarted my system so as to make sure the new settings are getting applied.
I had disabled the wireless network adapter. so as to avoid any changes of that conflicting with SharePoint.
I am able to add and use Visual webparts at the same time.
I am almost out of options on what to do with this error. Please help me.