Nhibernate.Bytecode.Castle Trust Level on IIS

Posted by jack london on Stack Overflow See other posts from Stack Overflow or by jack london
Published on 2010-06-14T12:39:53Z Indexed on 2010/06/14 12:42 UTC
Read the original article Hit count: 260

Filed under:
|
|

Trying to deploy the wcf service, depended on nhibernate. And getting the following exception On Reflection activator.

[SecurityException: That assembly does not allow partially trusted callers.]
   System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed) +150
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   NHibernate.Bytecode.ActivatorObjectsFactory.CreateInstance(Type type) +8
   NHibernate.Driver.ReflectionBasedDriver.CreateConnection() +28
   NHibernate.Connection.DriverConnectionProvider.GetConnection() +56
   NHibernate.Tool.hbm2ddl.SchemaExport.Execute(Action`1 scriptAction, Boolean export, Boolean justDrop) +376

in IIS configuration service's trust level is Full-trust also application's web config's trust level is full.

how could i make this service in working state?

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about castle