Infopath表单发布问题

发布于 2024-12-04 05:47:32 字数 2936 浏览 5 评论 0原文

我设计了信息路径表单。我正在按钮单击事件上编写所需的编程代码。但是在发布 infopath 表单时,我收到 在此处输入图像描述 错误;请注意:它应该允许我选择“表单库”选项,以便我可以这样做。微软从此处建议我需要删除代码。但一切都需要在我的表格中。我需要用代码部署表单。没有代码就没有任何价值。

我有副幽会证书,我的表格也得到了充分的信任。 我的 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

为什么要这样? :我想知道 Microsoft 何时避免使用 Interop COM 对象来实现我在 infopath 表单中使用的 Word 文件自动化。 看这里

我现在必须做什么?我需要选择其他方案吗?或通过尝试解决问题来移动???拜托,我需要正确的方向。

I designed the infopath form. I am writing required programming code on button clicked event. But while publishing the infopath form i am gettingenter image description here error; Please observe: It should allow me to select "Form Library" option so that i can do. From Microsoft it is suggested from here that i need to remove code. but everything is required in my form. I need to deploy form with code. without code it is without any value.

I have associate tryst certificate as well as my form is with full trust.
My infopath services are configured properly.
I am running sharepoint2010 in 2-tier farm.
I am using Infopath 2010 with Sharepoint 2010.
What else i need to be added...?

If i removes code then it shows me enter image description here and deployed properly.
Please , give me right direction.

    **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

Why should This? : I wondered When Microsoft is avoiding to use Interop COM Objects to use for word file automation which i used in my infopath form. Look Here

What i have to do now? do i need to go with alternatives ? or move by trying to resolve the issues ??? Please , i need right direction.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧城烟雨 2024-12-11 05:47:32

这是设计使然。一旦表单中有代码,您唯一的选择就是部署为“管理员批准的表单”。

要使表格显示在您的图书馆中,请执行以下操作:

  • 将其上传到管理中心(一般应用程序
    设置->管理表单模板)
  • 激活相应的功能在“高级设置”部分
    您的图书馆
  • 允许“ContentType Management”
  • 将表单添加为 ContentType

This is by design. As soon as you have code in your form, your only option is to deploy as "Administrator approved Form".

To get the form to show in your library, do the following:

  • Upload it in the Central Administration (General Applications
    Settings -> Manage Form Templates)
  • activate the according Feature In the "Advanced Settings" section of
    your library
  • allow "ContentType Management"
  • Add the Form as ContentType
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文