Unity + Fluent NHibernate + NHibernate 3.3.1.4 を中程度の信頼環境で使用する
var session = sessionFactory.OpenSession();
このエラーを返します:
Attempt by method 'NHibernate.AdoNet.SqlClientSqlCommandSet..ctor()' to access method 'System.Data.SqlClient.SqlCommandSet..ctor()' failed.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at NHibernate.AdoNet.SqlClientSqlCommandSet..ctor()
at NHibernate.AdoNet.SqlClientBatchingBatcher.CreateConfiguredBatch()
at NHibernate.AdoNet.SqlClientBatchingBatcher..ctor(ConnectionManager connectionManager, IInterceptor interceptor)
at NHibernate.AdoNet.SqlClientBatchingBatcherFactory.CreateBatcher(ConnectionManager connectionManager, IInterceptor interceptor)
at NHibernate.AdoNet.ConnectionManager..ctor(ISessionImplementor session, IDbConnection suppliedConnection, ConnectionReleaseMode connectionReleaseMode, IInterceptor interceptor)
at NHibernate.Impl.SessionImpl..ctor(IDbConnection connection, SessionFactoryImpl factory, Boolean autoclose, Int64 timestamp, IInterceptor interceptor, EntityMode entityMode, Boolean flushBeforeCompletionEnabled, Boolean autoCloseSessionEnabled, ConnectionReleaseMode connectionReleaseMode)
at NHibernate.Impl.SessionFactoryImpl.OpenSession(IDbConnection connection, Boolean autoClose, Int64 timestamp, IInterceptor sessionLocalInterceptor)
at NHibernate.Impl.SessionFactoryImpl.OpenSession(IInterceptor sessionLocalInterceptor)
at NHibernate.Impl.SessionFactoryImpl.OpenSession()
at BsCms.Bootstrapper.<>c__DisplayClass5.<BuildUnityContainer>b__2(IUnityContainer c)
at Microsoft.Practices.Unity.InjectionFactory.<>c__DisplayClass2.<.ctor>b__0(IUnityContainer c, Type t, String s)
at Microsoft.Practices.ObjectBuilder2.FactoryDelegateBuildPlanPolicy.BuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)
at Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context)
誰かが私を助けることができますか?