Custom form templates that contain form code, require full trust, or use a data connection managed by a server administrator must be approved and deployed by an administrator. Such form templates are called "administrator-approved form templates".
If a form template does not contain form code, require full trust, or use a data connection managed by an administrator, you can configure InfoPath Forms Services to permit users to deploy such form templates, called "user form templates," without administrator approval.
Configure the Admin approved InfoPath Forms Services at the Farm level:
Start -> Administrative Tools -> SharePoint 3.0 Central Administration
-> Application Management -> InfoPath Forms Services -> Configure InfoPath Form Services
-> User Browser-enabled Form Templates section:
- Select the Allow users to browser-enable form templates check box to allow users to deploy browser-enabled form templates.
- Select the Render form templates that are browser-enabled by users check box to allow browser-enabled form templates deployed by users to be rendered in a Web browser. If this option is not selected, users can still deploy browser-compatible form templates, but these form templates are not accessible through a Web browser.
Data Connection Timeouts Section:
- Set the default data connection timeout. Can override to any value lesser than this from the code
- Set the Maximum data connection timeout. Can override to any value lesser than this.
Data Connection Response Size Section:
- Data Connection responses size exceeding the value specified here causes the error.
HTTP data connections Section:
- If you hace SSL setup, then only select the Require SSL for HTTP authentication to data sources box.
Embedded SQL Authentication section:
- select the Allow embedded SQL authentication box to allow forms to use embedded SQL credentials. Forms that connect to databases may embed SQL user name and password data in the connection string. The connection string can be read in plaintext in the universal data connection file associated with the solution, or in the solution manifest.
Authentication to data sources (user form templates) section:
- select the Allow user form templates to use authentication information contained in data connection files box to allow user form templates to use embedded authentication information such as an explicit user name and password or a Microsoft Single Sign-On application ID.
Cross-Domain Access for User Form Templates :
- select the Allow cross-domain data access for user form templates that use connection settings in a data connection file box to allow user form templates to access data from another domain. By selecting this, we can bind a contol on the form located in Site A to a sharepoint list column located on the Site B.
- specify the thresholds at which to end user sessions and log error messages. Form operations that exceed these thresholds will terminate the user session, resulting in the loss of all form data entered during the session, and generate an error message.
- In the Number of postbacks per form session state box, type the maximum number of postbacks you want to allow. The default value is 75.
- In the Number of actions per postback box, type the maximum number of actions per postback you want to allow. The default value is 200.
- All the default settigns would work most senarios. To learn more about this sessions, see my blog 'Understanding InfoPath session state'.
- In the Active sessions should be terminated after text box, type the maximum session duration in minutes. Form-filling sessions that exceed this value will terminate, an error message will be generated, and all form data entered during the session will be lost. The default value is 1440 minutes.
- In the Maximum size of form session state text box, type the maximum session state size in kilobytes. Form-filling sessions that exceed this value will terminate, an error message will be generated, and all form data entered during the session will be lost. The default value is 4096 kilobytes.
- In the Select the location to use for storing form session state section, choose
Session State Service (best for low-bandwidth users)
Store session state data on the computer running Microsoft SQL Server
Form view (reduces database load on server)
Store session state data on the client computer. If form session state is larger than the value specified in the associated text box, the Session State Service will be used instead.
- In the associated text box, type the session state size in kilobytes at which form view will be automatically transitioned to the Session State Service. Once this threshold is reached, session state data will be saved to the SQL Server database, and the session will continue to use the Session State Service. The default value is 40 kilobytes.
Till here we are done with the Farm level configurations.
Now, lets look at the
Site Collection/Site level config:
Now that you have done with the fam level setttings, activate the 'Office SharePoint Server Enterprise Site features' feature in the sharepoint central admin and the site that you want to deploy the infopath form to be available.
Open the InfoPath form designer and design a form. Select the Browser settings in the form and apply full trust. In the publishing form wizard, check the 'Enable this form to be filled out by using browser' option that enables the 'administrator approved form template' radio button. Select the radio button and publish to a location where the fam admin can access on the file share.
Add the template to the central admin by uploading the .xsn file.
Now all we need to do is to to enable the form template available in the central admin to be available to a site collection.
Start -> Administrative Tools -> SharePoint 3.0 Central Administration -> Application Management -> InfoPath Forms Services -> Manage form templates
- Select the form template you want to apply and click on 'Activate to a Site Collection'.
(Check the default web application/site collection names. You can change the web app/site collection by clicking on the 'change' drop down and select the needed.
- Now, we made the template available to the site collection.To activate a form template to a site collection, go to the site Actions - > Site Settings -> Site Collection Admin -> Site Collection Features -> Find the named template and click on 'Activate' button.
- Now the form will be available in the 'Form Templates' library in the site collection.
Updating the administrator-approved form templates:Each administrator-approved form template is uniquely identified by its embedded uniform resource name (URN). So each time you change/create an infopath form in the design mode and ty to upload in to the Farm level form templates, if the new template name is not matched in the exisiting old form templates, it will crate a new template and assigns a new URN(New form upload scenario). If any name matched, sharepoint compares the available template's URN with the new template's URN being uploaded.
- If the New template URN is less than or equal to the Old emplate URN, the upload process will fail and error message will show the failure message.
- If the New template URN > Old template URN
You will have 4 options:
Option 1. Allow existing browser-based form-filling sessions to finish using the current version of the form template.
Option 2. Terminate existing browser-based form filling sessions. This approach is useful in the event that a form template is found to contain a serious bug or security issue, and you want to make the form template unavailable immediately.
Option 3. Perform a gradual upgrade, in which you upload the new version as a separate form template, and eventually remove the old version when it is no longer being accessed by users. This is a useful approach when your form template is accessible as an embedded form or through a link on a Web page, and you are not concerned about the possibility of the old version being accessed during the upgrade process. With both form templates available on InfoPath Forms Services, you can modify the link to the form template on your Web page.
Option 4. Quiesce the form template before upgrading to the new version. When you quiesce a form template, you gradually transition a form template from an active to an inactive state. This upgrade method is useful when you want to ensure that a form template cannot be accessed after a given time.
How to quiesce a form template:
SharePoint Central Administration -> Application Management -> InfoPath Forms Services -> Manage form templates.
- In the Manage Form Templates page you will see a Status column. Form templates that are available to users will be designated as Ready.
- Point to the file you want to upgrade, click the arrow that appears, and then from the menu select Quiesce Settings.
- Type the number of minutes you want the quiescing process to take. On a production system, you should quiesce the form for at least as long as the session state is configured for the server. By default, session state is configured for 240 minutes.
- Click Start Quiescing. In the Quiesce section, the status changes to Quiescing.
- To see whether your form has successfully quiesced,
Application Management tab -> InfoPath Forms Services -> Manage form templates.
On the Manage Form Templates page, in the Status column, form templates that you have quiesced will be designated as Quiesced.
After the form template is quiesced, you can deploy the upgraded new version of the form.