InfoPath 2007: Submit button error

699 views Asked by At

I have a button that has custom code which sends the form data to a database. When I build the custom code, I receive the following error when I click the 'Submit' button.

Things that I have checked:

  • I don't have any errors in the code.
  • I have tried all 3 trust levels in the 'Security and Trust' settings of the InfoPath form itself.

System.Security.SecurityException
That assembly does not allow partially trusted callers.
at InfoPath_FormNAme.FormCode.btnSubmit_Clicked(Object sender, ClickedEventArgs e)
at Microsoft.Office.InfoPath.Internal.ButtonEventHost.OnButtonClick(DocActionEvent pEvent)
at Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent pEvent)

1

There are 1 answers

0
Jeremy F. On BEST ANSWER

I did have to set the Security Level to 'Full' in order to get the button to work.