I have made a simple InfoPath formular, and in "Submit Options", checked "Perform custom action using Code", and write some custom code...
Then i run the debug over this code. The InfoPath formular opened in preview mode, and i could successfully step through InternalStartup method.
I did put some data in fields and clicked on "Submit" button. I expected to be continue debugging at the beging of "FormEvents_Sumbit" method, but i got this error message:
Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint.Security, Version=184.108.40.206, Culture=neutral, PublicKeyToken=71e9bce111e9429c' failed.
at TEST_FORM2.FormCode.FormEvents_Submit(Object sender, SubmitEventArgs e)
at Microsoft.Office.InfoPath.Internal.FormEventsHost.OnSubmit(DocReturnEvent pEvent)
at Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnSubmitRequest(DocReturnEvent pEvent)"
After i clicked OK to this error, i got another one, a little different:
"InfoPath cannot submit the form.
The OnSubmitRequest event handler did not work.
Request for the permission of type 'Microsoft.SharePoint.Security.SharePointPermission, Microsoft.SharePoint
View Complete Post