Domanda

I have a sandboxed solution and access some lists with Linq-to-Sharepoint. Now I attached an event receiver to the list type 101 because I have to restrict some files uploaded to picture libraries. This works fine.

But now my Linq-to-Sharepoint throws an error when I try to insert a new item to a list (only with Linq, it works fine if I create new items on that list via the regular user interface).

The error is 0x81020089 with the message The sandboxed code execution request was refused because the Sandboxed Code Host Service was too busy to handle the request. but the message is just default as the host service is not too busy and 0x81020089 is kind of a problem with an event receiver.

Everything works fine if I dont attach the event receiver but the error occurs when I do so - even if there is no code in the event receiver at all.

Any ideas?


Error message

0x81020089 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.SPGlobal.HandleComException(COMException comEx)
  • at Microsoft.SharePoint.Library.SPRequest.AddOrUpdateItem(String bstrUrl, String bstrListName, Boolean bAdd, Boolean bSystemUpdate, Boolean bPreserveItemVersion, Boolean bUpdateNoVersion, Int32& plID, String& pbstrGuid, Guid pbstrNewDocId, Boolean bHasNewDocId, String bstrVersion, Object& pvarAttachmentNames, Object& pvarAttachmentContents, Object& pvarProperties, Boolean bCheckOut, Boolean bCheckin, Boolean bMigration, Boolean bPublish, String bstrFileName, ISP2DSafeArrayWriter pListDataValidationCallback, ISP2DSafeArrayWriter pRestrictInsertCallback, ISP2DSafeArrayWriter pUniqueFieldCallback)
  • at Microsoft.SharePoint.SPListItem.AddOrUpdateItem(Boolean bAdd, Boolean bSystem, Boolean bPreserveItemVersion, Boolean bNoVersion, Boolean bMigration, Boolean bPublish, Boolean bCheckOut, Boolean bCheckin, Guid newGuidOnAdd, Int32& ulID, Object& objAttachmentNames, Object& objAttachmentContents, Boolean suppressAfterEvents, String filename)
  • at Microsoft.SharePoint.SPListItem.UpdateInternal(Boolean bSystem, Boolean bPreserveItemVersion, Guid newGuidOnAdd, Boolean bMigration, Boolean bPublish, Boolean bNoVersion, Boolean bCheckOut, Boolean bCheckin, Boolean suppressAfterEvents, String filename)
  • at Microsoft.SharePoint.SPListItem.Update()
  • at Microsoft.SharePoint.SPListItem_SubsetProxy.Update__Inner()
  • 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)
È stato utile?

Soluzione

Place the following in the registry:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\RPC

That key just has to be present. You don't need a value. Also, you will have to place that key in every registry that is running the Sandboxed Code Host Service. Once you do that, I would recommend that you restart the machine.

Here is a great blog article in regards to this issue. http://blogs.msdn.com/b/sharepointdev/archive/2011/02/08/error-the-sandboxed-code-execution-request-was-refused-because-the-sandboxed-code-host-service-was-too-busy-to-handle-the-request.aspx

Altri suggerimenti

I faced the same issue and the problem was an error (Object reference not set to an instance of an object) that is happening on the ItemUpdating event receiver.. debug should tell you what is missing..

when you use linq to sharepoint, the AfterProperties are only the properties that are changed by code, which is different that the UI update where all properties will be considered as changed

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top