최대 절전 프로젝트를 설정 중이며 프록시 오류가 계속 발생합니다. 내 프로젝트에 Castle 참조를 이미 추가했습니다. 나는 ProxyFactoryFactory가 구성되지 않은 지속적으로nhibernate web.config 문제
다음과 같은 오류를 얻을
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089"/> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> </configSections> <nhibernate xmlns="urn:nhibernate-configuration-2.2"> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> <property name="connection.connection_string">Data Source=192.168.1.100, 0000;Initial Catalog=GDER;Persist Security Info=True;User ID=re;Password=none12</property> <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> </nhibernate>
아직 : 내 Web.config의 다음과 같은있다. 사용 가능한 NHibernate.ByteCode 공급자 중 하나로 세션 - 팩토리 설정 섹션의 'proxyfactory.factory_class'속성을 초기화하십시오. 예 : NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu 예 : NHibernate.ByteCode.Castle.ProxyFactoryFactory> NHibernate.ByteCode.Castle
는
디버그는 항상 (NHibernate.ISessionFactory factory = config.BuildSessionFactory();
) 여기에 실패
NHibernate.Cfg.Configuration config = new NHibernate.Cfg.Configuration();
// add our assembly
config.AddAssembly("nHibernateTest");
// setup nhibernate session
NHibernate.ISessionFactory factory = config.BuildSessionFactory();
NHibernate.ISession session = factory.OpenSession();
// start nhibernate transaction
NHibernate.ITransaction transaction = session.BeginTransaction();
도와주세요 ...
코드를 올바르게 표시하려면 코드의 각 행을 4 칸 들여 쓰기하십시오. 또한 읽을 수 있도록 web.config 파일의 게시 형식을 지정해야합니다. 이 작업을 수행하는 방법은 [여기] (http://stackoverflow.com/editing-help)에서 확인할 수 있습니다. 지금처럼 읽기가 어렵습니다. –