Whenever I create an Infopath Filler Form in Infopath Designer 2010 and attach C# code there, for example, to show a messagebox on a button click, I am getting:
- InfoPath cannot open the selected form because of an error in the form's code. Policy settings prevent opening Internet forms with managed code. To fix this problem, contact your system administrator
until I change the Form Options--> Security and Trust from default
- "Automatically detect security level (recommended)"
which is "Domain (the form can access content form the domain in which it is located)"
- "Full Trust"
which has underlying comment there:
"For a form to run with a full trust, it must be installed or digitally signed with a certificate. To preview or debug a form with a full trust, this is not necessary"
Since, I do not have access to Central Administration (in Office 365, Sharepoint Online), I created a self-signed certificate and sign the client forms with it
Self-signed certificate is has duration of one month
Why are the Internet forms policies applied to client (non-browser-based) forms?
And what is the sense in forcing to digitally sign the forms?