In some cases the deployment of InfoPath forms has to be done through the central administration of the SharePoint 2007 as administrator approved form. For example if you are using custom C# or VB code this procedure is necessary. But are there other ways of deploying the forms to SharePoint server 2007, despite the way using the Publishing wizard of the InfoPath client?
Yes, there are many ways of getting the form templates into the SharePoint server 2007. Depending on your requirements different ways could be appropriate for you. Here I’d like to summarize the differences between administrator-approved Form Server Templates and the simple usage of site content types.
Source code in InfoPath forms requires the form to be fully trusty and therefore you have to upload it through the central administration. This is also leading the SharePoint Server to recycle the application pool of the SharePoint Portal web application. Something that is not very welcome in production environments, because the server is not serving requests for several seconds, up to a minute depending on the hardware and the workload.
Also it is difficult, when the designer of the form does not have administrator privileges on the form server. Such environments require steady contact between designer and administrator to publish, upload and approve the form templates.
So, we’ve not talked about the disadvantages of administrator-approved Form Server Templates, but what about site content types? Probably the site content types requires also a lot of work for the designer, but administrator privileges are only required on the site where the content type is created. But the greatest advantage of using site content types is that the application pool is not recycled and the server is not interrupted.
The procedure is as follows: On the “Modify all site settings” page go to “Site content types”. Click on create and give the content type a name (I suggest you do not use blanks here, you can change it later anyway) and a description. As parent content type please select “Document Content Types” and “Form”. Finally a group has to be set for the content type. A good starting point is the existing group “Microsoft Office InfoPath”.
If you created your content type add site columns from existing site columns or create new ones to be used in your form libraries and finally go to advanced settings and upload your InfoPath form template. The forms will be stored under \\servername\_cts\CONTENT*TYPE*NAME\Template*Name.xsn, but they will work like the administrator-approved Form Server Templates without any restrictions regarding the use of source code. The only real difference is the storage of the files that differs from the \\servername\FormServerTemplates\Template*Name.xsn folder when using the FormServerTemplates method. Probably this could help you a lot and if you experience disadvantages of the site content type method let me know. I didn’t either experience any by now…
Thanks to maikl for this great entry!