.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

The sandboxed code execution error

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :SharePoint


I have installed SharePoint standard edition on Windows Server 2008. Whenever I try to run a sandboxed solution using Visual Studio, sometimes I get the following message: 

"The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request."

Sometimes it just works and sometimes it does not. I have searched on the internet for this error and the solution was to make sure that the sandbox service is running on central administration web site. Central Administration > System Settings > Maange Services on Server > Microsoft SharePoint Foundation Sandboxed Code Service. In my case this service is always running. So I don't understand why Am I keep getting above error message sometimes?

Thanks, Hitesh

View Complete Post

More Related Resource Links

Error debugging sandboxed solution: The sandboxed code execution request was refused because the San



I'm trying to deploy a sandboxed solution but I don't succeed.
I created an empty sharepoint project, added a (regular) webpart to it and that's it. Didn't add any code of my own to the project.

Then I hit F5 to deploy it to my sharepoint server (visual studio and sharepoint running on the same machine)

First it gives me an attach security warning, where I hit "attach"
Then a message about scrip debugging disabled where I click ok to enable it.

Then my sharepoint site opens, I log in and it displays my default team site page.
I go edit the page and add my custom web part, and when I click add I get a loading window that seems to hang for a while and then an error:

The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request

I searched google and here on the forums, found several topics describing the same.
I checked and in Central Admin the service "Microsoft SharePoint Foundation Sandboxed Code Service " is started
I also tried to execute the powershell script (even though the server is not running DC)

All to no avail.
Am I missing something here, why do I get this error ?

The Sanboxed code execution request was refused because the sandboxed code host service was too busy

I am getting following error when I am running my sandbx solution ona virtual machine. "The Sanboxed code execution request was refused because the sandboxed code host service was too busy to handle the request" I verified  in central admin that my  Usercode service is already running. I also tried to run below script using powershell. $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 Any pointer would be highly appreciated!!  

No available sandboxed code execution server could be found

I am deploying the web parts as the sandboxed solution to the sharepoint 2010 environment and getting following error - "No available sandboxed code execution server could be found.", any idea?

List Item Update Exception from HRESULT: 0x80040E2F Unexpected query execution failure, error code 3


A thread somewhat simliar to this has been posted before as well, but i just wanted to detail out the issue and circumstances

We have a list with 53 columns and 2600 items(and growing. I know its rubbish, but thats the way it is at the moment). The list was created using SharePoint GUI  on a test server, saved as a template with data, and was then imported to the production environment. I can post the list columns and type if it helps.

Every one in a while, on updating an item, SharePoint throws up the very not so helpful error page with "Exception from HRESULT: 0x80040E2F".

We looked into the logs and found that for each suc error, there was a Database level error logged as well.

The error starts with Unexpected query execution failure, error code 3621. Additional error information from SQL Server is included below. "The statement has been terminated." Query text (if available): "BEGIN TRAN;DECLARE... and runs for many lines so i wont post the entire blurb here.

Each time, the item update is successful, despite this error. The list also has an Item Updated event handler attached to it. Every time the update error occurs, the event handler does not seem to be firing.

Anybody can shed light on what is happening. We have tried exporting the list template to another site and everything seemed to work

The sandboxed code execution request was refused because the Sandboxed Code Host Service was too bus


I keep getting this error erratically, i have confirmed that the relevant services are in fact running.

It kinda seems like some component elsewhere might be dragging down the host service, how do i go about troubleshooting this? Is there anyway i can maybe tweak this service to avoid this issue?


This is the error from the log:

FormServer Partial Trust - remote execution for solution 817a7b6d-3f38-46fc-94ef-e1c7f027d754 from site eefa926a-568b-4c36-b39d-0f09a22c323d failed with exception Microsoft.SharePoint.UserCode.SPUserCodeExecutionPipelineFailedException: The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request.    Server stack trace:      at Microsoft.SharePoint.UserCode.SPUserCodeExecutionHost.Execute(Type userCodeWrapperType, Guid siteCollectionId, SPUserToken userToken, String affinity, SPUserCodeExecutionContext executionContext)     at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)     at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)    Exception rethrown

Ho to fire the Application Error in asax from the code?


 Hi All,

I have this code in Global.asax but it not firing once an error occured:


void Application_Error(object sender, EventArgs e)



        // Get the error details

        HttpException lastErrorWrapper = Server.GetLastError() as HttpException;

        Exception lastError = lastErrorWrapper;

        if (lastErrorWrapper.InnerException != null)

        lastError = lastErrorWrapper.InnerException;



        string lastErrorTypeName = lastError.GetType().ToString();

        string lastErrorMessage = lastError.Message;

        string lastErrorStackTrace = lastError.StackTrace;



Please help me so I can call this method from any page?

Thaxxxxxxxxxxxxx a lot,



Custom tool error: Failed to generate code for the service reference 'CompanyService'. Please che


A little background because I feel I have an out of the ordinary architecture in place and don't know if this is contributing to the problem. 

We have an existing ASP.net application that is undergoing expansion.  The new functionality is all written in Silverlight 4.  As part of that expansion I gutted all the old Linq to SQL and put Entity Framework 4 into place.  To do this I created a standard .net Class Library and added my edmx files there.  Naturally, the business entities created by this cannot be used in Silverlight.  So I created a Silverlight Class Library and added all the business entities to that Silverlight Class Library as linked files.  I changed the name space to be the same.

So I have the following assembly / namespaces

Company.Project.Dal.csproj / Company.Project.Entities (.net 4 class library)

Company.Project.Entities.csproj / Company.Project.Entities (SL4 class library)

With this architecture I was able to share my business entities with my SL enabled web services, my asp.net projects, my silverlight projects.  Really it's a beautiful thing.

Once this was done I added "message" classes to Company.Project.Dal and again shared them with the other entites using linked files.  These messages are things like MyObjectRequest; they are class

Resume SharePoint Services Web Application and returns code 1387 error


Hello everyone! Newbie here. I would like to ask how to start the SharePoint Services Web Application on (WSS3.0,internal database, stanalone users) without getting error 1387 ?

I would love to provide more information regarding this issue but what I got is error 1387 displayed in the browser.

I look forward to seeing you guys feedback from your expertise angle.



Using tabs from the AjaxControlToolkit causes error: ...control contains code blocks (i.e. <% ... %>


I'm getting the error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

When attempting to add the tabs from the AjaxControlToolkit.  A little background..Theres an existing aspx page in a microsite which used the accordion control and the tabbed control ...I need to modify this page to use a different masterpage. 

The original site was .Net Framework 2.0 and the page in question used AjaxControlToolkit 1.0. which I manually installed originally.  Some of the site has been further developed using the .Net Framework 3.5.  (Come with AjaxControlToolkit) Now I have come to update this aspx page and I get the error above.

I have narrowed the down to the TabContainer (I think)  Does anyone have any experience with this sort of problem?  Also what version of the AjaxControlToolkit should be with the .Net Framework 3.5? I have 1.0.20229.20821. 

I also tried to browse to the AjaxControlToolkit.dll to add the tools to the tool box as they're missing... thinking this may be an indicator as to why it wasn't working. I get the error: 'There was an error loading types from assembly C:\inetpub\wwwroot\project\Bin\AjaxControlToolkit.dll Could not load file or assembly 'System.Web.Extensions. Version=

Showing Designer error for Silverlight App when trying to access resource which contains code e.Resu

Environment is: Silverlight 4, VS Studio 2010. Designer is showing error in a Silverlight App when trying to access a resource as below. And there are no build or runtime errors. Extensive research found that, in the "InvestorsProvider" class I am using wcf services, which has a callback method. In the call back method I am using this statement "this.MyProperty = e.Result" where e.Result is ObservableCollection. If I remove the e.Result it is not showing any designer problem. <UserControl.Resources> <local:InvestorsProvider x:Name="investorsProvider"></local:InvestorsProvider> </UserControl.Resources> Here is the error System.Reflection.TargetInvocationException [Async_ExceptionOccurred]Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50401.0&File=System.dll&Key=Async_ExceptionOccurred at System.ComponentModel.AsyncCompletedEventArgs.RaiseExceptionIfNecessary() at SilverlightApplication9.ServiceReference1.GetInvestorsCompletedEventArgs.get_Result() in C:\Documents and Settings\mennis\my documents\visual studio 2010\Projects\SilverlightApplication9\SilverlightApplication9\Service References\ServiceReference1\Reference.cs:line 115 at SilverlightApplication9.Inves

Error code 737D-Trying to download update

My computer is recommending that I download this: Security Update for SQL Server 2005 Service Pack 3 (KB970892) But it tells me this: Installation status: Failed Error details: Code 737D Update type: Important A security issue has been identified in the SQL Server 2005 Service Pack 3 that could allow an attacker to compromise your system and gain control over it. You can help protect your computer by installing this update from Microsoft. After you install this item, you may have to restart your computer. System: Windows Vista Home Premium Service Pack 2 HP Pavilion dv6700 notebook PC 32-bit Operating System Any ideas???  

SQL Server 2008 installation fails There was an error generating the XML document. Error code 0x84B

My system config: window XP - SP3 4 GB RAM, I have VS2008 with SP1, VS2010 Ultimate installed First when I tried to install SQL 2008 R2 Dev edition I got an error saying vs2008 SP1 was not installed, infact I had the SP1 installed in my m/c.  I did reinstalled the SP1 and tried to install SQL again. while in the final installation process I got the error  "Setup has encountered the following error: There was an error generating the XML document. Error code 0x84B10001." I uninstall the SQL server again to remove the files which were created from Unsuccessful installation I removed the register entry as suggested by this forum. reinstalled but no chance, I have tried all the option which I can get know in web. Please help me. here is the log files details  Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException 2010-08-26 14:54:53 Slp:     Message: 2010-08-26 14:54:53 Slp:         There was an error generating the XML document. 2010-08-26 14:54:53 Slp:     Stack: 2010-08-26 14:54:53 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache) 2010-08-26 14:54:53 Slp:   &nb

Wierd error during execution of SerializeReply of IDispatchMessageFormatter

I am trying to develop a WCF REST app as explained in http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/04640a45-1a37-4722-8ed7-9f75c155dc14 (which serves both XML and JSON at the same time). the error is in the return statement of the following code: Public Function SerializeReply(ByVal messageVersion As System.ServiceModel.Channels.MessageVersion, ByVal parameters() As Object, ByVal result As Object) As System.ServiceModel.Channels.Message Implements System.ServiceModel.Dispatcher.IDispatchMessageFormatter.SerializeReply Dim formatter As IDispatchMessageFormatter = Me.xmlFormatter If OperationContext.Current.OutgoingMessageProperties.ContainsKey(WebBodyFormatMessageProperty.Name) Then Dim webBody As WebBodyFormatMessageProperty = DirectCast(OperationContext.Current.OutgoingMessageProperties(WebBodyFormatMessageProperty.Name), WebBodyFormatMessageProperty) If webBody IsNot Nothing AndAlso webBody.Format = WebContentFormat.Json Then formatter = Me.jsonFormatter End If End If Return formatter.SerializeReply(messageVersion, parameters, result) End Function It gives the error as "The given key was not present in the dictionary." further going deeper the stack trace looks like the following: Encountered unexpected namespace 'http://schemas.microsoft.com/ws/2005/05/envelope/none'. The namespace must be empty. Parameter name: ns

WebFaultException throwing a "not handled by user code" error and returning an HTTP 500 to the clien

I am trying to return a BadRequest and simple message when implentation throws an error in a WCF REST service, but the WebFaultExcption itself is throwing an exception and returning an HTTP 500 instead. Any ideas on why this might be happening? Here is a short code snippet: [WebDispatchFormatter] [WebHelp(Comment="Initiate an immediate or callback appoinment request")] [WebInvoke(UriTemplate = "InitiateContact", Method = Verbs.Post)] public string InitiateContact(AppointmentRqst rqst) {      string ret = string.Empty;      rqst.DeviceId = Helper.GetHttpAuthHdrDeviceId();      try      {          ret = impl.InitiateContact(rqst);      }      catch (Exception ex)      {          throw new WebFaultException<string>(ex.Message, HttpStatusCode.BadRequest);      }      return ret; }

.Net Frameworks 3.5 Error code 1603

This is my error log, please help me. [02/11/10,13:32:48] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:32:48] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:33:07] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:36:40] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:36:40] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:37:00] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:42:15] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:42:15] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:42:37] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,13:51:05] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,13:51:05] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/10,13:51:22] WapUI: [2] DepCheck indicates WIC Installer is not installed. [02/11/10,14:05:01] WIC Installer: [2] Error code 1603 for this component means "Fatal error during installation. " [02/11/10,14:05:01] WIC Installer: [2] Setup Failed on component WIC Installer [02/11/

error code 0xc000007b

after my system boots i get a message saying..application failed to initialize(0xc000007b)... what is the solution please

Solved: LDAP authentication: error code 49 - 80090308, comment: AcceptSecurityContext error, data 52

Hi, I have a problem conneting to another domain (far.away.domain). We have a two-way trust to this domain. Also I can access the DS using ADSI edit and our Administrator account (ourdomain.com). I tried several types of credentials (userid = "CN=Administrator,CN=Users,DC=ourdomain,DC=com", "Administrator @ ourdomain.com" (without blanks)...). Connecting to ourdomain.com is no problem, but to far.away.domain I can't connect, I always get the error 525 (user not found). What could be the problem? Have I to use an entry from the ForeignSecurityPrincipals CN of the far.away.domain? I also tried to connect using Softerra LDAPBrowser and a command line ldapsearch without succes and with not a better error message. But why is it not possible to use a trusted account, or is this a active directory feature and does not work with pure LDAP bindings? Best regards, Nils.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend