Sandboxed Solutions are not Enabled in Sharepoint 2010
I was trying to write a simple browser enabled InfoPath form with code behind and like to get this run as Sandboxed solution in SharePoint 2010. When I was publishing this form following error was thrown:
"The form template cannot be published to the server: ServerName. Sandboxed Solutions are not enabled on the SharePoint Server Farm."
On further investigation I found that "Microsoft Sharepoint Foundation User Code Service" is required to run for the Sandboxed solutions to work. To enable this service go to Central Administration and in Manage Services on Server, Start “Microsoft Sharepoint Foundation User Code Service” :