Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a "Hello World" web part. When I pressed F5 in Visual Studio 2010, I got the following error. I have already got Microsoft SharePoint Foundation User Code Service started. Can anyone shine some light on this?

---------------------------
Microsoft Visual Studio
---------------------------
Unable to attach. Process 'SPUCWORKERPROCESS.exe' is not running on 'WIN-MP9OQOTCKB2'.

Do you want to continue anyway?
---------------------------
Yes   No   
---------------------------
PS C:\Users\beny> Get-SPServiceInstance | format-table TypeName, Id

TypeName                                                                                            Id
--------                                                                                            --
Managed Metadata Web Service                                                                        d6a50c63-3019-43da-bfec-e80610c7f3a1
User Profile Synchronization Service                                                                6711130a-53be-4b14-b321-b2260e952865
Business Data Connectivity                                                                          23a94bcb-82e7-410f-88ef-c501dba033f2
Secure Store Service                                                                                7b56e7e1-3469-4492-b1c0-db28c147ea9d
Microsoft SharePoint Foundation Workflow Timer Service                                              0d9a2d94-5e31-48db-a024-d28426f65f46
PerformancePoint Service                                                                            3e0e1407-15ef-4c0b-af61-6048ba6afeb8
Application Registry Service                                                                        46e7ddc8-49af-4a7e-9eee-155f526ed509
Microsoft SharePoint Foundation User Code Service                                                   98c9a822-7032-4a46-8b4b-6f5f14d9243a
Visio Graphics Service                                                                              9bc7d7a7-37c2-43e2-a764-9d8a0d2d4e4c
SharePoint Server Search                                                                            10243b97-ace5-41bb-a4da-0bd3ad65ca73
Document Conversions Launcher Service                                                               706e94e7-4d32-40ac-bfc6-8debca12ab9c
Document Conversions Load Balancer Service                                                          85bd84a2-ded2-41b1-b825-5ae6ed403192
Search Query and Site Settings Service                                                              9223cc15-d169-4c1b-8720-f1b0a153bd6d
Web Analytics Web Service                                                                           b5b08230-d2ae-4689-b396-bb217462a20e
Microsoft SharePoint Foundation Web Application                                                     da44271a-bdaa-451b-abe5-8621b52d86fd
Central Administration                                                                              43a3aa3d-b6ec-4081-9b35-2c17da1158f3
Excel Calculation Services                                                                          a1b626d7-02d7-468a-b4bc-5f2476af8667
Microsoft SharePoint Foundation Incoming E-Mail                                                     580ea7ef-8033-4ef2-9e8a-694bc489bfee
User Profile Service                                                                                3bf6b958-15b4-4bc8-bacf-68f4ef5f78cf
Access Database Service                                                                             325be236-2c86-46db-9f1f-2e3f5b805121
Microsoft SharePoint Foundation Subscription Settings Service                                       f601b3c7-1ded-4971-a5c3-49b217e8aeda
SharePoint Foundation Search                                                                        ab64b460-9c17-42dc-8744-8381f4e00bbb
Lotus Notes Connector                                                                               6bbab206-bf7e-414b-a12f-ecb55c4e3c94
Web Analytics Data Processing Service                                                               2450e96c-4d06-4f67-b032-a3283c9e08e7
Word Automation Services                                                                            1c20cfa8-cf14-48b1-8fbd-4669be301505
share|improve this question
add comment

3 Answers 3

up vote 1 down vote accepted

Make sure that you have started the Microsoft SharePoint Foundation Sandboxed Code Service in Central admin.

Also check that you are running Visual Studio 2010 using administrative privilegies

share|improve this answer
    
I do not see such a service in my Central admin, can you post the PowerShell command to start this service? –  Ybbest Mar 10 '10 at 22:24
    
Use "Get-SPServiceInstance | format-table TypeName, Id" and then copy the Guid for the "MS SP Foundation Sandboxed code service" and then run this "Start-SPServiceInstane <guid>" –  Wictor Wilen MCA MCM MVP Mar 11 '10 at 9:33
    
I still can not see Microsoft SharePoint Sandboxed code service after running the powershell.Is it possible I have overlooked something when I install SharePoint 2010 beta? –  Ybbest Mar 11 '10 at 19:40
    
Which services do you see when you are running get-spserviceinstance? –  Wictor Wilen MCA MCM MVP Mar 11 '10 at 20:35
    
Please see the modified questions above with a list of the services by running get-spserviceinstance –  Ybbest Mar 12 '10 at 10:14
show 3 more comments

There are Three Solutions Available


  1. Enable Sandboxed Solutions by using Central Administration

To enable sandboxed solutions by using Central Administration

Verify that you have the following administrative credentials:

You must be a member of the Farm Administrators group on the computer that is running the SharePoint Central Administration Web site.

On the home page of the Central Administration Web site -> System Settings -> Manage services on server.

On the Services on Server page, in the Server box, select the server on which you want to enable sandboxed solutions.

In the Microsoft SharePoint Foundation Sandboxed Code Service row, in the Action column, click Start.

Repeat steps 3 and 4 for each server on which you want to enable sandboxed solutions.


2.Enable Sandboxed Solutions by Using Windows PowerShell


To enable sandboxed solutions by using Windows PowerShell

Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

Click Start, and then click All Programs.

Click Microsoft SharePoint 2010 Products.

Click SharePoint 2010 Management Shell.

At the Windows PowerShell command prompt, type the following command:

Start-Service -Name SPUserCodeV4

Repeat this procedure on every server on which you want to enable sandboxed solutions


3.Enable Sandboxed Solutions by Using Windows PowerShell


To enable sandboxed solutions by using Windows PowerShell

Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

Click Start, and then click All Programs.

Click Microsoft SharePoint 2010 Products.

Click SharePoint 2010 Management Shell.

At the Windows PowerShell command prompt, type the following command:

$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
share|improve this answer
add comment

I had this problem also, but when I went to start the "Microsoft SharePoint Foundation Sandboxed Code" service I noticed that it was already started. I found that stopping & starting the service corrected the issue.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.