I am using InfoPath 2010, and SharePoint 2010. I have created a very basic test form that has one button, one field, and C# code behind. When I preview the form, I can click the button and see the text field get updated as a result of the code call. I am trying to publish the form as a sandboxed solution. My SharePoint installation uses a multi-server farm. When I try to publish the form, I recieve the following error:
The sandboxed solution could not be activated. The custom code in the form cannot be run. This functionality may be deactivated on the server. For more information, contact the server farm administrator.
Based on what I have already found on google, I have tried each of the following already but have not had any success, same error message still occurs.
- Checked with my network administrator to make sure that none of our servers are domain controllers. (This eliminates the possibility of this being the issue - http://support.microsoft.com/kb/2026191)
- Made sure the 'Microsoft SharePoint Foundation Sandboxed Code Service' is running
- Restarted the 'Microsoft SharePoint Foundation Sandboxed Code Service'
- Checked the ULS error logs and there are no errors showing up when I attempt the publish
- Use 'Server Manager' to make sure the 'SharePoint 2010 User Code Host' service is running
- Tried publishing a form with code using the farm administrator account to make sure it wasn't a permissions issue. Same error.
- Tried increasing the SPUserCodeService.WorkerProcessExecutionTimeout value from 30 to 300
- Made sure there were not any errors in the Design Checker within the InfoPath form
- I do not believe that any of the 'using' statements in my code could be calling a dll that requires full trust. I am only using the four specified below
- Microsoft.Office.InfoPath
- System
- System.Xml
- System.Xml.Xpath
- In the InfoPath form, under Form Options > Security and Trust, I have tried using the 'Automatically determine security level' as well as 'Domain'. Same error both ways. If I change it to be Full Trust, I get a different error which I would exect since it would need to be published as administrator approved.
Any advice would be greatly appreciated.
Thanks
-Andrea