Upgrading browser form template with custom code to 2010, Missing assembly errors on upload to SharePoint - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Upgrading browser form template with custom code to 2010, Missing assembly errors on upload to SharePoint

Last post 01-06-2011 12:38 PM by Ken Ordeneaux. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 12-23-2010 11:09 AM

    Upgrading browser form template with custom code to 2010, Missing assembly errors on upload to SharePoint

    I have a form template created in InfoPath 2007 with some custom code behind that I want to upgrade to 2010.  I opened the .xsn in design mode in 2010, went to code editor, told it where to find my .proj for the custom code, went to the Programming tab in Advanced Form Options and clicked "Upgrade OM" (it now reads C#), saved the form template as "InfoPath Web Browser Form Template" (2010), and then published as a Administrator-approved form template.

     When I try to upload the form template to my SharePoint 2010 farm through Central Admin, it tells "The form template has been successfully uploaded to the farm."  I hit ok, I'm redirected to Manage Form Templates, the status is "Installing" momentarily, then it becomes "Failed to Upload."  I view the properties of this form template, and click the "Failed to Upload" status link and get this error first:

    Failed to load receiver assembly "Microsoft.Office.InfoPath.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" for feature "FT-01-9f26398f-468a-5114-c40a-d656226b4d28" (ID: 9f26398f-468a-5114-c40a-d656226b4d28).: System.IO.FileNotFoundException: Could not load file or assembly

     I grabbed this version 12 dll from my 2007 SP farm, and install it in the GAC.  I did an IISReset, recompiled my form template, republished and got the same results.  Finally I restarted my server, reuploaded and then I got this error:

     Could not load file or assembly 'Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

     I installed that dll to my GAC, repeated all of the steps (even restarting), and then got this error:

    Could not load file or assembly 'Microsoft.Office.Server.Diagnostics, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The system cannot find the file specified.

    I GAC'd that dll, repeated again and now I'm getting:

    Unable to cast object of type 'Microsoft.Office.InfoPath.Server.Administration.FormsService' to type 'Microsoft.Office.InfoPath.Server.Administration.FormsService'.

    I'm certain it is not my custom code referencing these 2007 assemblies.  I used .Net Reflector to verify. 

    This leads me to believe that something went wrong with my upgrade of the form template from InfoPath 2007 to 2010.  Somehow it is holding on to the older versions of InfoPath’s core assemblies.  Has anyone experienced this or know how to fix it?  I'm trying to avoid recreating this complex form template from scratch in 2010.

    Thanks!


     

     

  • 01-06-2011 12:38 PM In reply to

    Re: Upgrading browser form template with custom code to 2010, Missing assembly errors on upload to SharePoint

    With help from Joel Alley with Microsoft support, we determined the cause and solution to this issue:

    Resolution:  Force Forms Services to recreate the entire feature with the following steps:

    1) Browse to SharePoint Central Administration and the “Manage Form Templates” page
    2) Select the form template that "failed to upload" and remove it.
    3) On each front-end server, navigate to the “c:\program files\common files\microsoft shared\web server extensions\14\template\features” folder.
    4) Make sure the “FT-[GUID]” folder corresponding to the form template is no longer present on any of the servers.  If it is, delete it.
    5) Try to upload the form template through the “Manage Form Templates” page again.
     
    Cause: In retrospect, I determined that this issue was probably caused because I copied several of my custom features over from my 2007 farm in the upgrade process.  I probably inadvertently copied those InfoPath features along with my custom features, because I sorted the feature folders by date modified to separate the custom from the OOB.

    There was no error logged or otherwise given to indicate that Central Admin did not sucessfully write the 2010 feature to the WFEs.   The upload process simply continued and installed whatever feature was in the "FT-01-7fb663d3-b8a4-2ed5-7163-621e9f30d663" folder (in my case).  I suspect MS will fix this in a hotfix and have the upload form template process overwrite the feature directory if it already exists, or at least catch and log the error in ULS.  Considering that the feature folder has a GUID in the name, I can understand how the possibility of an IOException was overlooked.

Page 1 of 1 (2 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.