Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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)"

to

  • "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

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.

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:

http://office.microsoft.com/en-us/infopath-help/about-security-features-of-infopath-HP001096719.aspx

share|improve this answer

Your Answer

 
discard

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.