No available sandboxed code execution server could be found

by James 11. June 2011 12:39

Silly me!  I thought I’d get through Sharepoint 2010 - ‘hello world’ without any bumps.  But, of course, when I went to add my newly created webpart to my newly created page, I was treated to this little reminder of what I should well expect after fourteen years of Microsoft programming.

After four hours of searching, several ineffective antidotes, and a lot of valuable education, my aggravation was finally relieved by an amalgam of all aforementioned prescriptions.  I did exercise scientific method, so I can offer this with some confidence.  

Mine is a Windows 7 “development” install, which was done well after VS2010 + all applicable windows updates.

Symptoms

  • Event Log Entries
    • Event ID: 7034
    • “The Sharepoint 2010 User Code Host service terminated unexpectedly.  This has happened n times.
  • ULS Log Entries – log path should be “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS”
    • Performance Counter OS (pdh) call failed with error code PDH_INVALID_HANDLE.
    • PDH failure on counter \MachineName\ASP.NET\\Requests Current with error Unknown error (0xc0000bbc)
  • SharePoint 2010 User Code Host Service will not start (the event log isn’t lying).

Resolution

The issue seems to be because SharePoint is unable to create the performance counters for its process.  While the authors of the various blogs that I encountered seemed to have rather isolated symptoms, I was lucky to have a bit of several…

  • Make Sure the account under which the Sharepoint 2010 User Code Host Service is running is in the following groups.  After doing so, stop and start the SharePoint 2010 User Code Host Service.
    • Performance Monitor Users
    • WSS_WPG
    • WSS_ADMIN_WPG
  • The service account should have write access to the logs directory
    • “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS”
  • The service account should be that which was configured during install.  I understand that SharePoint also makes other assumptions based on that account, so that if you were to change it – as some suggest – to an account with greater privilege, you will likely encounter other issues.
  • Check that your performance counters are set-up properly
    • The registry key HKLM\Software\Microsoft\Windows NT\CurrentVersion\Perflib\009 should contain three entries (Default), Counter and Help
    • You should have a file named perfc009.dat in c:\windows\system32.
    • If these conditions aren’t satisified, run the following command from you VS2010 command prompt.  lodctr /r
  • The value for “Disable Performance Counters” under registry key HKLM\System\CurrentControlset\services\PerfProc\Performance should be 0.

Yes, my configuration violated all of these; I don’t know what I did so terribly wrong during my install, other than assuming that Microsoft’s installer would do its job.  Bitter, I know, yet I’ll keep on sharpening my axe, as it were, with Microsoft’s toolset.

Tags:

SharePoint 2010 | .NET

Comments

9/30/2011 11:25:36 AM #

Hey! This is a real cool website.

newsletter ideas United States

11/19/2011 8:29:49 PM #

After buying this, you will understand that how advantageous this is thanks all again and wishing a good luck.

cheapest mobile contract United Kingdom

12/29/2011 5:34:41 PM #

many thanks for this useful post

dental implants price United States

12/30/2011 8:57:24 AM #

UK based best various mobile shopping website
search mobile phone deals from UK’s leading retailers. Great mobile shopping Offers


cheap HTC phones United States

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



Advertisement

RecentPosts