Developing Windows Applications to Perform InfoPath Forms Services Administration Tasks
Applies to: SharePoint Server 2010
Building a Windows application that works with InfoPath Forms Services enables you to automate administrative tasks, such as deploying form templates, gathering information about form templates already deployed, or configuring the server running InfoPath Forms Services.
The classes that support these operations are contained in the Microsoft.Office.InfoPath.Server.Administration namespace, which is part of the Microsoft.Office.InfoPath.Server.dll assembly. For example, the FormsService class enables configuration of InfoPath Forms Services, and the FormTemplateCollection class is a collection of form templates that have been deployed using the SharePoint Central Administration site. The other namespace in the assembly that is designed for use by developers is Microsoft.Office.InfoPath.Server.Controls, which contains the XmlFormView class. This class is used to host InfoPath forms in a custom Web page. For more information about using the XmlFormView class, see Authoring Custom Web Pages That Contain the XmlFormView Control.
In this section, you will learn how to build three Windows applications that use classes from the Microsoft.Office.InfoPath.Server.Administration namespace to manage and configure InfoPath Forms Services. You will need Visual Studio installed on a server running InfoPath Forms Services as part of Microsoft SharePoint Server 2010.
In This Section
How to: Quiesce a Form Template Selected From a List
Build a Windows application to list all administrator-deployed form templates on the server, and then select a form template from the list to quiesce.
How to: Log and Reset InfoPath Forms Services Configuration Settings
Build a Windows application to log current values and reset InfoPath Forms Services configuration settings to their default values.
How to: Verify a Batch of Form Templates
Build a Windows application to verify all form templates located in a folder and list any converter messages associated with them. This application can also be modified to upload all form templates in a folder.
For each task, you can create a new Windows Application project in Visual Studio in your language of choice, or create additional forms for each task.
Although the code examples in the Microsoft.Office.InfoPath.Server.Administration namespace use a console window to display information, and the stsadm.exe command-line tool is useful for configuring SharePoint, this section will focus only on developing a Windows application using Windows controls and Visual Basic and C# code.