我设计了infopath表格。我正在按钮点击事件上编写所需的编程代码。但是在发布infopath表单时,我收到错误;请注意:它应该允许我选择“表单库”选项,以便我可以这样做。从Microsoft here建议我需要删除代码。但是我的形式需要一切。我需要使用代码部署表单。没有代码它没有任何价值。
我有关联的约会证书以及我的表格是完全信任的。 我的infopath服务配置正确。 我在2层农场运行sharepoint2010。 我正在使用Infopath 2010和Sharepoint 2010。 我需要添加什么...?
如果我删除了代码,那么它会显示并正确部署。 拜托,给我正确的方向。
**Edited:**
I deployed this form as form template and activated it by central admin site. and assigned to form library as content type. but while running this form (from Document-> New Document->MyContentTypeTemplate),
i got exception:
Business logic failed due to an exception.
(User: domainname\user, Form Name: MHPMEmployeeInformationTemplateChanged9, IP: , Request: http://spwfe1:7000/_layouts/FormServer.aspx?
XsnLocation=http://spwfe1:7000/FormServerTemplates/MHPMEmployeeInformationTemplateChanged9.xsn&SaveLocation=http:
//spwfe1:7000/OfficialResumeFormLibrary&Source=http://spwfe1:7000/OfficialResumeFormLibrary/Forms/AllItems.aspx&DefaultItemOpen=1, Form ID: urn:schemas-microsoft-com:
office:infopath:MHPMEmployeeInformationTemplateChanged9:-myXSD-2011-09-06T18-40-25, Type: UnauthorizedAccessException, Exception Message: Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.) a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
Verbose Calling GlobalStorage.SetItem with index LastExceptionLogged value type UnauthorizedAccessException. a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
Medium Exception thrown from business logic event listener: System.UnauthorizedAccessException:
Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.
at EmployeeInformation_Template.DocGenerator.CreateWordDocument(Resume objResume, Object oTemplate)
at EmployeeInformation_Template.FormCode.GetInfopathData() at Microsoft.SharePoint.SPSecurity.<>c__DisplayClass4.<RunWithElevatedPrivileges>b__2()
at Microsoft.SharePoint.Utilities.SecurityContext.RunAsProcess(CodeToRunElevated secureCode)
at Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(WaitCallback secureCode, Object param) at
Microsoft.SharePoint.SPSecurity.RunWithElevatedPrivileges(CodeToRunElevated secureCode) at Employe... a2e8bb5f-26d2-485a-bf9c-0a333eaa71e7
为什么要这样? :我想知道微软何时避免使用Interop COM对象来用于我在我的infopath表单中使用的word文件自动化。 Look Here
我现在要做什么?我需要选择其他选择吗?或试图解决问题移动???拜托,我需要正确的方向。
答案 0 :(得分:0)
这是设计的。只要您的表单中包含代码,您唯一的选择就是部署为“管理员批准的表单”。
要使表单显示在库中,请执行以下操作: