Wednesday, 9 January 2013

Process ‘SPUCWORKERPROCESS.exe’ is not running

Recently , I tried to create a sand boxed solution for SharePoint 2010 using Visual Studio 2010 have created a ” web part. When I pressed F5 in Visual Studio 2010, I got the following warning message even I have already got Microsoft SharePoint Foundation User Code Service started.

Microsoft Visual Studio
Unable to attach. Process 'SPUCWORKERPROCESS.exe' is not running on 'server'.

Do you want to continue anyway?
Yes No

I have cehecked services.msc and found that "SharePoint 2010 User Code Host(SPUserCodeV4 service)" is running properly.

Then I have checked Central Admin and found that "Microsoft SharePoint Foundation Sandboxed Code Service" under System Settings -> Manages Services on Server
is also started.

After googling,I have found out the Sand boxed solution does not work on DC(Domain controller).If you are using SharePoint on DC, the following Windows PowerShell command would need to be run to enable Sandboxed Solutions. Link

$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)
Set-Acl HKLM:\System\CurrentControlSet\Control\ComputerName $acl

No comments :

Post a Comment