Unrecognized configuration section hibernate-configuration.
描述:
无法识别的配置节点 hibernate-configuration
原因:少了: <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" />
解决方案:
<?xml version="1.0" encoding="utf-8" ?> <configuration> <!-- Add this element --> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate" /> </configSections> <!-- Add this element --> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="connection.connection_string">Server=.\SQLEXPRESS;initial catalog=Test;Integrated Security=true</property> </session-factory> </hibernate-configuration> <!-- Leave the system.web section unchanged --> <system.web> </system.web> </configuration>
引用
NHibernate遇到的错误
最新推荐文章于 2019-04-26 16:10:28 发布