Search code examples
.netformsinfopath

Can not display form with .net code using InfoPath 2013, getting "Error in the application"


We have java application which embeds InfoPath ActiveX control to display forms. All is working fine with InfoPath 2010.

When I use IP2013 I can open only forms which do not contain .NET code. When I try to open forms which contain .NET code I get following error

(InfoPath:0x80043004) InfoPath cannot open the following file: path\to\file.
The form cannot be opened. To fix this problem, contact the form designer.
??
Form template: file:///path\to\template.xsn
InfoPath cannot open the selected form because of an error in the form's code.
Error in the application.

What exactly does the error mean? I was unable to find explanation of the error code or the message. What can I do to resolve the issue?

Some background and tests I ran: I have 3 forms

  1. form created in IP2007 with .NET 3.5
  2. form created in IP2010 with .NET 3.5
  3. form created in IP2013 with .NET 4.5
  4. form created in any version of InfoPath without .NET code

Everything works when I open forms directly in InfoPath. When I open form in java application using the InfoPath ActiveX I get following

  • InfoPath 2010 - forms 1, 2 and 4 work fine, form 3 fails (this is expected)
  • InfoPath 2013 - form 4 works fine, all other forms fail to open with the error above

Solution

  • This turned out to be Microsoft bug, specifically in CLRLOADER.DLL. Installing latest service packs and patches (KB3039714 helped to me) resolved the issue