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?

2 Answers 2


If you are putting managed code that is publishing to SharePoint or SharePoint Online (O365) then it wants to make sure that anything with managed code is signed. Those forms could have malicious code.

  • Who wants? I cannot preview client form on my development workstation before and without any publishing to anywhere untli I put it in Full Trust! Jul 1, 2012 at 19:23

This is not specific to SharePoint but how InfoPath functions in general. The security level dictates which functions are available for use in your forms, and more elevated levels require some type of assurance as to the safety of the form. Just signing the form by itself also doesnt open up all access via published form. InfoPath leverages your systems zone policies as well, so if it's not being served from a trusted URL, or you have the form setup to run from a trusted location, there will be problems with the form.

Please review the following Microsoft article:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.