sharepointsharepoint-2010event-receiverlinq-to-sharepointsandbox-solution

Sharepoint event receiver and linq to sharepoint


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


Solution

  • 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