Managed Code Problem

N

Nick

Hi- I have a fully trusted and signed form that opens and everything runs
fine on my machine, and also on 2 other peoples machines (they are
developers, and have VS.NET installed). On 2 machines that do not have
VS.NET installed, the form doesn't seem to allow the managed code to get
reference to the taskpane, and I am not able to update it on fired events.
Any ideas? I am pretty stumped. I am hoping that its a missing assembly
somewhere, but unfortunately infopath does not throw any exceptions on
events, just nothing happens.
 
N

Nick McCulloch

is the .NET runtime installed on these 2 other machines? managed code stuff
wont work without this.
 
N

Nick

I Know for sure on one, because its running a C# managed code app without
problems, so I doubt that is the problem. Its a good point to check though,
sometimes the obvious escapes us.
 
F

Franck Dauché

Hi,

You are probably missing Microsoft.mshtml.dll in your C:\Windows\Assembly
folder of your target computer.

Franck
 
N

Nick

Franck-

Your the man! That was it. Now, the challenge is, how to distrubute
painlessly to the user. I tried setting the assembly reference to local =
true. This added the dll into the xsn (making it quite a bit larger).
Infopath would then throw an exception of "Security Error". If just
installing it manually, then the form works. Anyone have any
recommendations? I was thinking about a script in the form code that checks
for that assembly on load, and if it doesn't exist, download and install it.
Let me know your opinions.

Thanks, Nick
 
F

Franck Dauché

The easiest way may be to copy the dll in the GAC folder of the target
machine during install and to use gacutil.exe and regasm.exe from the .Net
framework to register the file. Just use an install package such as Wise to
do it.
No matter what, don't include in the XSN....

Franck
 
G

G. Tarazi

We had some similar problems in out systems, some PC's had InfoPath
installed and .NET 1.0, and 1.1, some didn't have 1.1, and after installing
the runtime, the forms still didn't work.



So we end up, uninstalling InfoPath, reinstalling the .NET Framework 1.1
with its service packs, reinstalling InfoPath with its service pack, and the
forms then did work fine.
 
M

Marc Wetters

Instead of distributing The MSHTML.Dll which is installed with visual studio.
You can better use late binding!
 

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