Skip to main content

I have an InfoPath form that I use to kick off a workflow. The customer has asked that I change it from being a client form (where it was working properly), to one that's filled out in the browser. It has code behind, so I'm following the instructions for deploying, signing, and publishing, and that has worked for me in the past on other forms.


The problem is that when I attempt to publish this form to Central Admin > Mange Form Templates, I get this error:
There was a failure loading SourceCode.Workflow.Client.dll. Details: Could not load file or assembly 'file:///C:UsersusernameAppDataLocalTemp mp7E8A.tmpSourceCode.Workflow.Client.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format..


Has anyone run across this before? I can't seem to find anything about this form that is different from other working forms.


Thanks in advance. 


Reference: http://www.k2underground.com/blogs/howtok2/archive/2009/06/29/using-code-behind-with-infopath-forms-sharepoint-and-k2.aspx

Couple of links:


http://www.k2underground.com/blogs/howtok2/archive/2009/06/29/using-code-behind-with-infopath-forms-sharepoint-and-k2.aspx


http://microsoftechies.wordpress.com/2010/08/26/infopath-integration-integrating-k2-blackpearl-with-infopath-with-code-behind/


 


dc,


Thanks, those are exactly the instructions I've been using. They have worked great on my other forms. This one keeps giving me that dll error though.


The reference and the using statement both appear to be good, the dlls are in the GAC, the form works if I open in in InfoPath, but for whatever reason I can't upload it as a form template in central admin.


Thanks


Apologies, I missed that reference you provided at the end of the post. I have seen this once or twice (not with InfoPath specifically though), allowing 32 bit applications in IIS solved that for me:



  1. Open IIS Manager, right click on the CA app pool and select "Advanced Settings"
  2. Set "Enable 32-bit Applications" to True
  3. Do an IIS reset and test

OK, I tried that but the CA App Pool won't ever start back up. Actually It says started, but goes back to stopped once I navigate the browser to CA. I just get a 503 error.


Apparently that has stopped CA for other users too: http://social.technet.microsoft.com/Forums/sharepoint/en-US/5555ef61-8104-462a-ac89-23eb23f0ab51/cannot-access-central-admin


It's odd that aother form deploys just fine and appears to have the same reference.


In case anyone else runs in to this, I think I may have found the solution. K2 support directed me to this discussion http://www.k2underground.com/forums/t/12907.aspx, which pointed out to me that there is both a 32 and 64 bit version of the K2 dlls. My form was created using the 32 bit version prior to a SharePoint and server upgrade. Switching to the 64 cleared up the error and the template uploaded.


The 32-bit version of K2 assemblies can be found in C:Program Files (x86)K2 blackpearlin. The 64-bit version of K2 assemblies can be found in C:Program Files (x86)K2 blackpearlHost Serverin - this is the AMD64 file.


Reply