VSTO Infopath Form Security Issue
I have a VS2008 project - Customizing an InfoPath Office 2007 Form with a little code. I ran the publish wizard to create an msi installation. It will just be used by other developers (deployment template) who already have all the core components installed (framework, VSTO runtime).
I've read all the security documentation I can find, but nothing seems particularly applicable to my situation.
When the behind-the-scenes code is executed on the machine where the installation was started, this is an error:
System.Security.SecurityException
Request failed.
at Microsoft.Office.InfoPath.MsxmlNavigator.IsValidNode(MsxmlNode test)
at Microsoft.Office.InfoPath.MsxmlNavigator.MoveToFirstChild()
-- one of my calls
at System.Xml.XPath.XPathNavigator.MoveToChild(String localName, String namespaceURI)
-- more of my code follows
Since this is my code is working, it says that security is not related to loading my normal .dll. I thought.
a source to share
I got the same error, but I fixed it by changing the security level on the InfoPath form.
Tools -> Form Options -> Security and Trust
I unchecked the "Automatically detect ..." checkbox and set the full trust form and added a certificate.
Of course, for dev purposes, the certificate was signed on its own and I highly doubt it will fly when I post the form to the SharePoint site (something will be discussed tomorrow ... or today if I get to that .. .)
a source to share