Method not valid message

A

Alex Irazabal

I am using managed code on a form that wants to access the DOM object based on the thisXDocument object created in _Startup by the Infopath wizard when the C# project was created. When I try to publish the form I get the following error:
C:\Documents and Settings\alex\My Documents\Visual Studio Projects\addresssort\FormCode.cs(82): 'Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument2.GetDOM(string)' denotes a 'method' which is not valid in the given context
What does that mean? I gave the form full trust and signed...

Along those lines, is there a way to debug in full trust mode? I want to be able to write a file but am forced to publish the form and then run it to see the output. Suggestions???
Thanks,
Alex
 
A

Andrew Ma [MSFT]

Like the other message says, you need to call GetDOM(), not just .GetDOM

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 

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