Home All Groups Group Topic Archive Search About

Why am I not trusted?

Author
12 Oct 2006 3:53 PM
Sid DeLuca
I am trying to secure an Excel smart document using WSE3 and VSTO.  I have
Office 2003 Pro, VS 2005, WSE3, and VSTO installed (not SE).

I have downloaded the Excel Invoice Sample application and modified it to
work with a web service I developed that is secured using WSE3 extensions and
the wse3policyCache file. 

The web service works as expected from my Windows Forms smart client. 
However, when I try to configure the proxy class in the excel document I get
the following error at runtime:

WSE032: There was an error loading the microsoft.web.services3 configuration
section.


************** Exception Text **************
System.Configuration.ConfigurationErrorsException: WSE032: There was an
error loading the microsoft.web.services3 configuration section. --->
System.Configuration.ConfigurationErrorsException: An error occurred creating
the configuration section handler for microsoft.web.services3: That assembly
does not allow partially trusted callers. ( ....

(remaining error text omitted)

I am developing on my local machine.  All of the files are local, except the
web service, which is on another server in the same domain.  Can someone tell
me why my Excel document is a "partially trusted caller" instead of a "fully
trusted" caller?

Author
12 Oct 2006 6:05 PM
Claus Konrad
It seems to be a local setting. The assembly calling into WSE must be fully
trusted to avoid the CAS exception you are seeing here.

Make sure your own managed assembly, hosted by Excel in turn creating the
AppDomain in action, is fully trusted. To make absolutely sure - sign your
assembly to give it a strongname and trust that strongname using .NET 2.0
Administration from Windows giving it fulltrust. Make sure the trust is set
at the Machine Level and at the "My_Computer_Zone" group.

/Claus Konrad


Show quoteHide quote
"Sid DeLuca" wrote:

> I am trying to secure an Excel smart document using WSE3 and VSTO.  I have
> Office 2003 Pro, VS 2005, WSE3, and VSTO installed (not SE).
>
> I have downloaded the Excel Invoice Sample application and modified it to
> work with a web service I developed that is secured using WSE3 extensions and
> the wse3policyCache file. 
>
> The web service works as expected from my Windows Forms smart client. 
> However, when I try to configure the proxy class in the excel document I get
> the following error at runtime:
>
> WSE032: There was an error loading the microsoft.web.services3 configuration
> section.
>
>
> ************** Exception Text **************
> System.Configuration.ConfigurationErrorsException: WSE032: There was an
> error loading the microsoft.web.services3 configuration section. --->
> System.Configuration.ConfigurationErrorsException: An error occurred creating
> the configuration section handler for microsoft.web.services3: That assembly
> does not allow partially trusted callers. ( ....
>
> (remaining error text omitted)
>
> I am developing on my local machine.  All of the files are local, except the
> web service, which is on another server in the same domain.  Can someone tell
> me why my Excel document is a "partially trusted caller" instead of a "fully
> trusted" caller? 
>
Author
12 Oct 2006 11:11 PM
Sid DeLuca
Thanks for your post, Claus.  This was helpful.

I also found selecting "Evaluate Assembly" from the Runtime Security Policy
node to view "code groups that grant permissions to the assembly" helpful in
determining the problem.

Show quoteHide quote
"Claus Konrad" wrote:

> It seems to be a local setting. The assembly calling into WSE must be fully
> trusted to avoid the CAS exception you are seeing here.
>
> Make sure your own managed assembly, hosted by Excel in turn creating the
> AppDomain in action, is fully trusted. To make absolutely sure - sign your
> assembly to give it a strongname and trust that strongname using .NET 2.0
> Administration from Windows giving it fulltrust. Make sure the trust is set
> at the Machine Level and at the "My_Computer_Zone" group.
>
> /Claus Konrad
>
>
> "Sid DeLuca" wrote:
>
> > I am trying to secure an Excel smart document using WSE3 and VSTO.  I have
> > Office 2003 Pro, VS 2005, WSE3, and VSTO installed (not SE).
> >
> > I have downloaded the Excel Invoice Sample application and modified it to
> > work with a web service I developed that is secured using WSE3 extensions and
> > the wse3policyCache file. 
> >
> > The web service works as expected from my Windows Forms smart client. 
> > However, when I try to configure the proxy class in the excel document I get
> > the following error at runtime:
> >
> > WSE032: There was an error loading the microsoft.web.services3 configuration
> > section.
> >
> >
> > ************** Exception Text **************
> > System.Configuration.ConfigurationErrorsException: WSE032: There was an
> > error loading the microsoft.web.services3 configuration section. --->
> > System.Configuration.ConfigurationErrorsException: An error occurred creating
> > the configuration section handler for microsoft.web.services3: That assembly
> > does not allow partially trusted callers. ( ....
> >
> > (remaining error text omitted)
> >
> > I am developing on my local machine.  All of the files are local, except the
> > web service, which is on another server in the same domain.  Can someone tell
> > me why my Excel document is a "partially trusted caller" instead of a "fully
> > trusted" caller? 
> >