共用方式為


How to: Deploy Form Templates That Contain Form Code That Requires Full Trust

Applies to: SharePoint Server 2010

The process of deploying an InfoPath form template that contains form code that requires full trust to a server that is running InfoPath Forms Services can be divided into three distinct steps:

  1. Getting the form template ready. This step creates a new .xsn file which contains information about the server it will be deployed to.

  2. Uploading the form template to the server. This step requires a farm administrator to add the form template to the server and includes the optional step of verifying that the form template can be uploaded.

  3. Activating it to a site collection. This makes the form template available on a site collection so that it can be filled out in the browser or in the InfoPath Filler, depending on whether users have Microsoft InfoPath 2010 installed.

To get a form template ready to be deployed by a server administrator

  1. Open the Publishing Wizard by clicking the File tab, clicking Publish, and then clicking SharePoint Server.

  2. On the first screen of the Publishing Wizard, type the URL of a SharePoint Server that you have at least Contribute rights to, which means that you can add and delete content on the site, and then click Next.

  3. On the second screen of the Publishing Wizard, keep the default settings of Enable this form to be filled out using a browser and Administrator-approved form template (advanced), and then click Next.

  4. On the third screen of the Publishing Wizard, type a location and file name for the form template (.xsn) file. This can be on your local hard disk, a network file share, or a Web server. Click Next.

  5. On the fourth screen of the Publishing Wizard, click the Add button to select fields from the form template that will be shown as columns in the form library and in Outlook folders. You can also select fields that will be available as SharePoint Web Part connection parameters, if the form is displayed in the InfoPath Form Web Part. Both of these field selections are optional. After you are finished, click Next.

  6. On the last screen of the Publishing Wizard, click Publish. This saves your form template (.xsn) file to the location that you specified. It is now ready to be uploaded to the server.

To upload a form template to a server that is running InfoPath Forms Services

  • Open the SharePoint 2010 Central Administration site.

Note

You must be a member of the Farm Administrators group in order to complete these steps.

  1. Under General Application Settings, click the Manage form templates link.

  2. Click the Upload form template link near the top of the page.

  3. Click the Browse button to open a dialog box, and enter the path of the published form template.

  4. Click the Verify button to verify that the form template has no errors. This step is optional.

  5. Click the Upload button to upload the form template to the site. After uploading is finished, click the OK button.

To activate a form template to a site collection

  1. On the Manage Form Templates page, locate the form template that you uploaded.

  2. Click the drop-down, and then select Activate to a Site Collection.

  3. In the Activation Location section, click the drop-down, and then select Change Site Collection.

  4. On the Select Site Collection dialog box, click the Web Application drop-down, and then select Change Web Application.

  5. Click SharePoint - 80. This should be the name of your default SharePoint Server. If not, select your default SharePoint Server.

  6. Click the site collection name that you want to activate the form to, and then click OK.

  7. On the Activate Form Template page, click OK.

Note

Alternatively, if you are a site collection administrator, you can activate a published form template from the site collection administration page. To do that, open the top-level site collection page, click the Site Actions drop-down list, click Site Settings, and then click Site collection features under Site Collection Administration. Locate the uploaded form template, and then click the Activate button.