i have an infopath form load up forms from 2 different templates.. Using the line:
thisApplication.XDocuments.NewFromSolution(path)
path is a variable containing the URI.
The error is this:
System.Runtime.InteropServices.COMException
InfoPath cannot create a new, blank form.
InfoPath cannot load this form. The signature on this form is not from a trusted publisher.
Microsoft.Office.Interop.InfoPath.SemiTrust.XDocumentsCollectionWrapper.NewFromSolution(Object varURI)
Here is the 'weird' part: This error is not thrown every time.
My source form we'll call S. My two templates we'll call T1 and T2.
I click a button on S to load T1. It works.
I do it again, it works.
I click a button on S to load T2. IT fails.
Click a button on S to load T1. It fails.
(mind you, this is somewhat random... sometimes things work perfectly)
If the path were the problem the form would never load and i shouldn't be getting a signature error.
Also - I am a trusted publisher.
If i manually load up T1 or T2 without going through S, it will work without throwing any security errors. And those forms have calls which require full trust.
I guess what i'd like to know is what types of things can cause that error which could also be changing just from me running a form from a template?
note: Our IT guys were messing around with the group profiles, and when they were done i had to resign and install my security certs but they still worked. I'm 95% sure that has something to do with it, as everything was working fine before that.