Unable to use caching application block with signed assembly

Topics: Building and extending application blocks, Caching Application Block , Enterprise Library Core, General discussion
Jul 16, 2007 at 10:48 AM
Hi All,

I am getting following error:
"An error occurred creating the configuration section handler for cachingConfiguration: That assembly does not allow partially trusted callers."

I have signed caching dll with my own signature but still giving me the error
please help me if anyone has solution to this problem.
Jul 16, 2007 at 4:31 PM
Hi,

The problem is not with solved by signing the assembly; in fact this happens because the assemblies are signed by you client code isn't. Unfortunately you cannot call the signed EntLib's assemblies from untrusted code because they don't allow partially trusted callers (you can learn more about this subject from http://msdn2.microsoft.com/en-us/library/ms345097.aspx). You can either sign your application or use unsigned versions of the assemblies.

Fernando
Jul 17, 2007 at 2:42 PM
Actually my assembly where i want to use CAB is signed and enterprise library is not signed.
Jul 17, 2007 at 3:35 PM
Hi,

I suggest you use the .NET 2.0 MMC plugin to evaluate the policy level for your apps assemblies. For some reason the policy level for one of them is not "Unrestricted". It could also be that your app is explicitly denying permissions at runtime.
You can also try to narrow down the problem with a minimal repro application.

How are you deploying your application? Are you using ClickOnce?

Fernando