可能重复:
NHibernate WCF Rest IIS7 Fails with Security Exception
尝试部署wcf服务,取决于nhibernate。并在反射激活器上获得以下异常。
[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
IIS配置服务的信任级别中的是完全信任 应用程序的Web配置信任级别已满。
我怎样才能使这项服务处于工作状态?