Hi,
In my project, I need to embed some InfoPath data-entry fomrs into a windows application. As per the current architecture of the application, the data entry forms need to be developed using InfoPath and published onto a netwrok shared folder. These InfoPath forms, internally talk to the SQL database through our data access layer - refered as DLL in each InfoPath form. The host windows application will be installed on each clients machine and appropriate InfoPath forms will be made available to the users based on their rules.
All done, I am running into a deployment issue at this stage. I created an InfoPath form and published onto a netwrok drive. I need to enable Full trust and sign it with the current user's certificate to enable access to the clients. The problem that I am currently facing is that although the published InfoPath form opens properly into the InfoPath client application (with a Security Notice pop-up) the same form cannot be opened through the FormControl control of .NET.
The host application (windows application) throws an exception saying: Hosted InfoPath cannot create a new, blank form. Hosted InfoPath cannot load this form. The signature on this form is not from trusted publisher. Following is the code that I am using to programmatically open the published xsn:
try
{
if (!File.Exists(filePath)){ ... }
InfoPathControl.NewFromFormTemplate(filePath);
}
catch (Exception ex) {
... }
where InfoPathControl is an object of Microsoft.Office.InfoPath.FormControl
Can anyone please help me with surpassing this security issue? How do we successfully open the published InfoPath forms onto a client application in such a scenario??
Thanks in advance,
Anjali