Nhibernate.Bytecode.Castle在IIS上的信任级别

时间:2010-06-14 12:39:54

标签: nhibernate castle full-trust

  

可能重复:
  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配置信任级别已满。

我怎样才能使这项服务处于工作状态?

0 个答案:

没有答案