Saving from Code

L

Lee

Hi All,

I am trying to simplify our form here by putting command buttons on it for
things like cancel & save.

I am getting what looks like a security error and am not understanding why.
Thanks

This line causes this error,

thisXDocument.Save();
Security error.
at Microsoft.Office.Interop.InfoPath.SemiTrust.XDocumentWrapper.Save()
at Microsoft.Office.Interop.InfoPath.SemiTrust.XDocumentWrapper.Save()
at _BaseForm._BaseForm.cmdSave_OnClick(DocActionEvent e) in
c:\development\project\forms\baseform\formcode.cs:line 49
at
Microsoft.Office.Interop.InfoPath.SemiTrust._ButtonEventSink_SinkHelper.OnClick(DocActionEvent
pEvent)
 
V

virgul

Hi,

If you are in preview mode it's normal! This is not accessible try to
publish it in full trust !

Is your form in full trust mode and sign if not see on the msdn how to
make this! he has great example!

If you are in full trust and that don't work! try to copy your document
in one XMLDocument after make .Save!

Hope this Help!

++

Thierry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top