reference problems in Infopath 2003

D

diego.covini

I have some problem with MS Infopath 2003.

In the "code behind" of my template I referenced a DLL. I signed the
template with a certificate and set the trust level to "full trust"
before publishing it.

Here's the problem: if I put the DLL in the GAC, everything goes right,
but I need to put the DLL in every client's GAC (that's not possible in
my scenario).
I tried to reference the DLL with "copy local = true" option: the DLL
is embedded in the XSN file, but when a client try to preview a form, I
get a "security error".

Can you help me?
 
D

diego.covini

this is the error message I get when the DLL is referenced locally:

Form template: file:///\\server\template\test.xsn
InfoPath cannot open the selected form because of an error in the
form's code.
Security error.

S. Y. M. Wong-A-Ton ha scritto:
 
D

diego.covini

this is the error message I get when the DLL is referenced locally:

Form template: file:///\\server\template\test.xsn
InfoPath cannot open the selected form because of an error in the
form's code.
Security error.

S. Y. M. Wong-A-Ton ha scritto:
 
S

S.Y.M. Wong-A-Ton

That's not much of a security error message, is it? :) In any case, the
problem sounds like a code access security (CAS) issue.

It does not make much sense to me that calls to the DLL in the GAC would
work, but not when it's located in the XSN, while your form already has full
trust? Perhaps the DLL cannot verify the full trust of its caller (the form)
when it's inside the XSN...

If you created the DLL yourself, try adding the
"AllowPartiallyTrustedCallers" assembly attribute to it and see if that helps.
 
Top