I created a stub form that has some C# code in the FormCode.cs file for the FormEvents_Loading event. It runs fine locally (from the designer) but when I try to import it into DBXL by following the getting started with DBXL guide, I start getting the below error. Wondering if I need to "publish" the file to some package format before going into DBXL? I am using DBXL version 2.4.3978.28391 and Form version 22.214.171.1240.
My code-behind just uses the AD service from DBXL to look up the current users deparmtent then queries my DB using a secondary DB datasource.
InfoPath cannot open a new form.
The form cannot be opened. To fix this problem, contact the form designer.
Form template: HTTP://Intranet.mydomain.ca/QdabraWebService/Forms/ID/1373/template.xsn
InfoPath cannot open the selected form because of an error in the form's code.
One or more required components of InfoPath or the form template cannot run because of a security restriction.
Contact your system administrator or run Setup again to confirm that .NET Programmability Support is installed on your computer.
Request for the permission of type 'Microsoft.Office.InfoPath.InfoPathPermission, Microsoft.Office.InfoPath.Client.Internal.Host, Version=126.96.36.199, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
at Microsoft.Office.Interop.InfoPath.SemiTrust.XDocumentsCollectionWrapper.NewFromSolution(Object varURI)
at AdminTool.Configuration.OpenTemplate(String templateUrl)
at AdminTool.Configuration.btnOpenNewDocument_OnClick(DocActionEvent e)
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)