0

我已按照将 InfoPath 2010 表单发布到 SharePoint 2010 中的表单库教程中描述的说明,并在 SharePoint 2010 中的表单库中成功发布了 InfoPath 2010 表单。

我想开发一个使用 XmlFormView 组件显示的 Info Path *.xsn 文件的自定义 VisualWebPart。我以下列方式配置了我的 XmlFormView:

<cc1:XmlFormView … XsnLocation="/FormServerTemplates/*.xsn">
</cc1:XmlFormView>

当我将自定义 VisualWebPart 嵌入到任何页面时,我遇到以下错误:

w3wp.exe (0x1454)
0x1594
InfoPath Forms Services
Runtime
e568
Verbose
Unexpected exception while getting file at:
http://SharePointUrl/FormServerTemplates/*.xsn.
Exception of type:SPException. Message:Cannot open file "FormServerTemplates/*.xsn".be9cb443-292a-4c80-9188-06a01e6393c5
4

2 回答 2

1

*.xsn 将不起作用,您必须指定特定的 infopath form teamplate。

于 2011-06-03T13:25:50.617 回答
0

在“<a href="http://www.apress.com/9781430227069”的“<a href="http://www.apress.com/9781430227069" rel= “nofollow">SharePoint 2010 作为开发平台”一书:

在发布向导中,系统会要求您为表单模板指定位置和文件名。您可以指定要发布您的内容类型的站点内的任何文档库。但是,您的表单模板的最佳位置是站点内名为“表单模板”的库。该库在每个站点中都可用,并且可以通过路径 /FormServerTemplates 访问。

指定表单模板的位置和文件名:

http://SharePointUrl/FormServerTemplates/ *.xsn

<cc1:XmlFormView … XsnLocation="/FormServerTemplates/*.xsn">
</cc1:XmlFormView>
于 2011-06-03T19:44:49.797 回答