" to NHibernate. Check the inner exception for more information的異常,那是可能因爲NHibernate版本的問題.,
在配置文件,可能有的是
<add key="hibernate.connection.connection_string" value="xxx" />這樣子配置,NHibernate2.0以後,已經簡化了,應該改成
<add key="connection.connection_string" value="xxx" />,去掉配置前面的
hibernate.這時,運行可能出現Nbernate 出現NHibernate.Bytecode.ProxyFactoryFactoryNotConfiguredException: The ProxyFactoryFactory was not configured的異常,這時在配置文件添加<add key="proxyfactory.factory_class" value="NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" />就好,運行一切正常
在NHibernate2.0以後,已經簡化