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

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

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

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :SharePoint

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

View Complete Post

More Related Resource Links

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!!  

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 ?

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?

The sandboxed code execution error



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

Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust



I want to pass parameter to Silverlight Control deployed as a Webpart.For this i used WebpartStorageAttribute for getting the values while configuring the Webpart.

It deployed Successfully but when i try to add webpart its raising the following error

Unhandled exception was thrown by the sandboxed code wrapper's Execute method in the partial trust app domain: Could not load type 'Microsoft.SharePoint.WebPartPages.WebPartStorageAttribute' from assembly 'Microsoft.SharePoint, Version=14.900.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.

Thanks in Advance

C++ and ATL: Use ATL Server Classes to Expose Your Unmanaged C++ Code as an XML Web Service


Throughout this issue, you'll read all about the promise of Web Services and how the .NET Framework enables Web Service development. Many people will also be building their Web Services atop C++ code and frameworks like ATL Server, particularly when performance is paramount. In this article, the authors show how fully functional Web Services are built using ATL Server and Visual Studio .NET. Beginning with unmanaged C++ classes, they add ATL attributes that make the code work over HTTP.

Kirk Fertitta and Chris Sells

MSDN Magazine December 2002

Windows Script Host: New Code-Signing Features Protect Against Malicious Scripts


Downloading scripts from the Web or e-mail leaves users vulnerable to security risks because scripts can't be signed. But now developers can use Windows Script Host (WSH) to hash scripts so users can verify their source and safety. With WSH, scripts can be signed or verified using all the same tools ordinarily used to sign EXE, CAB, DLL, and OCX files. This article discusses public-key cryptosystems, the process of signing and verifying scripts in WSH, and several warnings about attacks that could potentially be made against cryptographically secured scripts and ways in which to avoid them.

Eric Lippert

MSDN Magazine April 2001

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

How to use ESB Transformation Service in .Net Code

Good day everyone, I am creating a .Net application which receives different XML files. Some of them need conevrsion from one format to another format. I have created some BizTalk maps for them. But I don't know how to use them in .Net code. I found some info that there is some ESB Transformation services in BizTalk, which could be call from .Net code. Can some one tell me some sample code or some article which explains that how will we use these ESB transformation Services? Thanx in advance.  

How to Find out Windows service application path from Code ?

Dear frnds, Could you please help me to find out the path of  windows serivce exe ( application path ) from code?   Regards. Sajid P K  

Why request parameter added to client side code in each method while using svcutil.exe

Hi, I am using WCF services in my project and want to call WCF methods asynchronously. I am hosting WCF service programmatically in windows app as follows svc = New ServiceHost(GetType(Service1), New Uri("net.tcp://localhost:8806/")) Dim svcMDB As New ServiceMetadataBehavior svc.Description.Behaviors.Add(svcMDB) svc.AddServiceEndpoint(GetType(Service1), New NetTcpBinding(), "MyBusiness/MyBusinessService/") svc.AddServiceEndpoint(ServiceMetadataBehavior.MexContractName, MetadataExchangeBindings.CreateMexTcpBinding(), "MyBusiness/MyBusinessService/mex") svc.Open() Me.Text = "Service started...." and I am generating client side proxy using svcutil.exe as follows. svcutil /n:net.tcp://localhost:8806/MyBusiness/MyBusinessService,MyService net.tcp://localhost:8806/MyBusiness/MyBusinessService/mex /a /language:vb   The result of this command is as :   Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation.  All rights reserved.   Attempting to download metadata from 'net.tcp://localhost:8806/MyBusiness/MyBusi nessService/mex' using WS-Metadata Exchange. This URL does not support DISCO. Generating files... D:\Prabodh\New C2k\Test Projects\DataTableToArray\MyHost\bin\Debug\MyBusinessSer vice.vb D:

Service is executing code after time out.

Hi All,  I am using IsOne way and nettcp binding in mu WCF. [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,ConcurrencyMode=ConcurrencyMode.Multiple)]   public class FlexiAsyncServer : IAsyncInterface   {       public void OneWayRequest()         {              for (int i = 0; i <= 5000; i++)                 {                     DbCommand cmd = dbAsync.GetSqlStringCommand("insert into  JOB_DEFNN (JOB_NM,JOB_STAT_CATG_ID,JOB_GRP_ID) values('"+i.ToString()+"',1,101)");                     dbAsync.ExecuteNonQuery(cmd);                 }           } } In Service side before inserting this 5000 records into database i am getting time out error in client side. But though i got error the records are being inserted until it complets 5000. My question is why the service side execution is not stopping a

change the PHP page with WCF service on Servers only, without chnging code on the calling client sid



I need to change the PHP page with WCF service, but the problem is that many of our clients are sending(usig POST) large stream data like binary files to our PHP website, now we are upgrading our system and moving towards wcf services,

The problem is that we want our clients to only change URL, and do not need to change any code in their calling mechanism or no need to create proxy on their cliend side. We simply change php to wcf services on our Servers only. Our clients are using .net 2.0 client application. Is there any way to do this. or Is this possible ?

One thing which I get from internet is use Rest based wcf services.

Have anybody some example or idea to accomplish my task.


Please provide sample web service code for BDC


I am using Microsoft Business Data Application Definition Editor.

I need to create  a LOB system by connecting to a web service. But dont know how to proceed with creating web methods in web services for BDC.

Can anyone give me a sample web service code for BDC please?

Code Execution under System Account



I am trying to run a item event handler. Some of the users will not be having the permissions to execute the code, hence I am trying to run the code under the system account, regardless of the user signed in.

This is the code I have tried:


SPUser user = SPContext.Current.Web.AllUsers[@"SHAREPOINT\SYSTEM"];
SPUserToken superToken = user.UserToken;
 using (SPSite site = new SPSite(SPContext.Current.Web.Url, superToken))



I would like to execute my code block to all the users. Hence I had tried to use the System Account. But when I try to execute the code, I am getting error as "Object reference not set to an instance of an object." when the code is trying to execute the below line:


SPUser user = SPContext.Current.Web.AllUsers[@"SHAREPOINT\SYSTEM"];


How to execute the code using System Account, so that all users have the rights.

Thank you

TCP error code 10061: No connection could be made because the target machine actively refused it.

I hosted a wcf service application using windows services. When my client (ASP.NET) tries to call the service class hosted by the windows service, I get this error "TCP error code 10061: No connection could be made because the target machine actively refused it. ". Is there a fix for this? The same code works fine if I host it using a console application.
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