rkopitzke

I have an Infopath form that I'm using for the task form for a custom workflow. The form calls a webservice to get a list of entries to populate a drop down list. The form is configured for full trust. In preview mode the web service executes and the drop down list is populated. When I publish the form to the workflow and then deploy the workflow feature the form does not work. It fails to load with "The form has been closed" message. In the error detail description it says the following:

Could not load file or assembly 'file:///C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\AcrWorkflow4\Form\AcrTaskB2.dll' or one of its dependencies. The system cannot find the file specified.

there is also the stack trace if anyone is interested in that.

This happens if I use the managed connections to create the connection to the web service or if I add a web service reference in the code behind and try to execute it there.

Any help would be much appreciated.




Re: SharePoint - Workflow Infopath Task Form with WebService could not load file or assembly error

rkopitzke

Woo hoo.. answering my own post after a MS support call. Also per the MS support rep this is not documented.

When you publish the task form to the workflow you must also take the additional step of Save As Source Files on the task form in Infopath to the same network location (workflow project) you publish the infopath form to. Then you need to modify the bat file in the workflow project to XCopy the infopath dll file up to the feature folder along side of the .xsn file.

Why you need to do this is beyond me. The dll file is embedded in the xsn file that you are already placing there. You would think the products would be well integrated enough to get the dll out of the xsn file. But no, you have to manually extract it and then get it placed along side the xsn.





Re: SharePoint - Workflow Infopath Task Form with WebService could not load file or assembly error

Tarang Patel

Similar problem I was having. I wrote code on Form_Loading event for Task Edit form.
Initially
I didnt copy the dll for the task form into to 12/templete/Feature /<ProjName> folder because .xsn file packaged dll and all other file inside it.

But it gave me same error. didn't find "taskForm.dll" file. So i copy that dll manually to the 12/templete/Feature /<WF ProjName> and did IISRESET. Finally task form loads up in browser.

Thanks.





Re: SharePoint - Workflow Infopath Task Form with WebService could not load file or assembly error

abdelrahman Tawfeek

Dear Patel,

Thank you a lot sir concerning your kindly reply and information

You have no idea how much you helped me (Y)

Wish You Best Wishes