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 an Infopath Form which has some custom C# Code written. Since this form contains code it has to be an admin approved form and hence I need to go to central admin -> upload template and then Activate the form to site collection which creates a content type at site collection level and sets the content type document template URL to /FormServerTemplates/ExpenseReport.xsn. Then I can create a forms library and set its content type to the form templates content type. Basically I'm trying to render the form in Browser(Infopath Forms Services).

Is this the only approach to access an admin approved form. I assume when you upload the form it recycles the app pool of the central admin and hence server wont be available for a minute or so. Correct me if i'm wrong.

Is there an alternate approach to access admin approved without uploading the form to central admin... Can I upload the form directly to Site Collection and still mimic the central admin approach.

My environment is SharePoint 2010 but the Infopath Template version is 2007.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Firstly, we need to know whats happening behind the scenes with Admin approved forms while uploading and activating within the Central Admin.

Behind the simple click of the Upload button, InfoPath Forms Services creates a feature to deliver the form template (.xsn file). The feature is then wrapped in a Windows SharePoint Services solutions package which is a .wsp file (just a renamed .cab file) that contains the feature and some other packaging information. This solution package is the means of deployment to all of the servers in a farm. All Web front-end servers will have the form template propagated to their file systems, via the solution’s package. Thus deploying the infopath form's wsp in the farm, creates all the normal process of deploying a wsp and recycling the application pool after that.

There is another method of deploying the InfoPath Form with code behind as sandbox solution on SharePoint 2010. This method of deployment is directly done from InfoPath designer and never requires the application pool to be reset.

But again, it comes with the limitations of a sandbox solution like,

  • Cannot submit to e-mail data connections.
  • Cannot have properties promoted for part-to-part connections.
  • Must not have any managed meta-data controls or data connections.

Please view this msdn article to view the comparison of Sandboxed and Administrator-approved Solutions

Also view some sample InfoPath forms deployed using Sandbox solutions.

If you have finally decided on deployment as Sandbox solution for your forms, then check out this codeplex tool which would assist in deployment of these forms in production environment where you don't have InfoPath designer installed.

share|improve this answer
    
I just read this article bit.ly/sRTprp in infopath blog. As you said it creates a feature when the form template is uploaded and activated in Central admin. I want to know if I can do this without uploading to central admin. I not looking at sandboxed solution. Thanks for your reply. Much appreciated. –  Kannan Feb 2 '12 at 6:21
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.