To all MCP Is this a Infopath Bug ??

B

Bart

Hello,

infopath permission=DOMAIN
iam logged in as Administrator of the local machine.

in my sumbit method i created an Activex object

**********************************
var fso, f1;
fso = new ActiveXObject("Scripting.FileSystemObject");
f1 = fso.CreateTextFile("c:\\testfile.txt", true);

the file is being created in c:
***********************************
i change my code to the following and i get a permission denied error
*****************************************
var es = new ActiveXObject("Msxml2.DOMDocument.5.0");
es.load("c:\\Book1.xml");
es.save("c:\\book2.xml");
I get a permission denied error
*************************************
my question is both are Activex Objects why is infopath treating them in a
diffrent way, both are performing the write operation. Does each Active
objects have its own permissions????.

one intresting thing to note is that when using ActiveX for MSXML the window
"Do you want enable Activex Controls or someting cant remember" dosen't show
up in the infopath runtime.

Thanks In Advance
Bart
 
B

Brian Teutsch [MSFT]

This is not a bug. InfoPath does not allow the creation of arbitrary ActiveX
objects from script. Certain components are "safe for scripting", such as
the MSXML component. Most require that your *form* be full trust, regardless
of your permissions on the machine. There's lots of info in the SDK and the
newsgroup on creating full-trust forms.

Brian
 

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