SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
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! – Gennady Vanin Геннадий Ванин Jul 1 '12 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:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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