Debug That assembly does not allow partially trusted callers

  • Thread starter Thread starter Joris van Lier
  • Start date Start date
J

Joris van Lier

I'm running an ASP.NET 2.0 web application in a Medium Trust environment,
the application uses ODBC to connecto to MySQL and the hosting company has
granted OdbcPermission,
the solution includes a Visual Studio 2005 Web Deployment Project which is
configured to add the AllowPartiallyTrustedCallers attribute to the
assemblies.

However I still get a SecurityException with the message "That assembly does
not allow partially trusted callers"
The top 2 frames of the call stack are
ASP.default.aspx..ctor()
__ASP.FastObjectFactory_app_web_default_aspx_cdcab7d2_muaz0ibj.Create_ASP_default.aspx()


How do I find out WHAT assembly is meant with THAT?
 
if you apply the AllowPartiallyTrustedCallers attribute to an assembly, to
run it in a mediumn trust enviroment, it must be strongly named, and
installed in the gac. you host probably did not install your page assemblies
in the gac, so the first load of a page gets the error.


-- bruce (sqlwork.com)
 
bruce barker said:
if you apply the AllowPartiallyTrustedCallers attribute to an assembly, to
run it in a mediumn trust enviroment, it must be strongly named, and
installed in the gac. you host probably did not install your page
assemblies
in the gac, so the first load of a page gets the error.

Do you mean that my website assemblies (the compiled pages) must be
installed in GAC or Odbc.NET ?
How am I supposed to do updates on the site when the host doesn't allow me
to install assy's into GAC??
 
One way is to complain. I have found that admins have all sorts of weird
security policy without understanding the implications of these policies. On
the other hand, they may have a very straight forward way to address your
issue. You won't know until you inform them of the problem you are having.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Download OWC Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $15.00
 
Back
Top