Deployment of an InfoPath form with code behind as a Sandbox solution can only be done using the InfoPath designer. But on a client’s production environment, it would be really difficult to use this approach for deploying InfoPath forms. So in order to mitigate this issue, the InfoPath Form Sandbox Deployment Utility can be leveraged.
The InfoPath Form Sandbox Deployment Utility is a console application which can deploy any InfoPath form with/without code behind as a sandbox solution without requiring the InfoPath client itself. This utility can be used to deploy the InfoPath form locally or on a remote server provided the user running the application is the site collection administrator for the target SharePoint site.
!!! Get Started
* Download the InfoPath Form Sandbox Deployment Utility runtime.
* Download the User Guide.