Ich habe den folgenden Fehler bei der Konfiguration von mvc3 und Nhibernate. Kann mir bitte jemand sagen, was ich verpasst habe.Setzen Sie die Eigenschaft hibernate.dialect Fehlermeldung
Ausnahmedetails: NHibernate.HibernateException: Der Dialekt wurde nicht festgelegt. Legen Sie die Eigenschaft hibernate.dialect fest.
Quellfehler:
Zeile 16: { Zeile 17: NHibernate.Cfg.Configuration Konfiguration = new NHibernate.Cfg.Configuration(); Zeile 18: configuration.AddAssembly (System.Reflection.Assembly.GetExecutingAssembly()); Zeile 19: sessionFactory = configuration.BuildSessionFactory(); Zeile 20:}
Meine web.config ist wie folgt:
<configSections> <section name="cachingConfiguration"type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings,Microsoft.Practices.EnterpriseLibrary.Caching"/> <section name="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/> <section name="hibernate-configuration"type="NHibernate.Cfg.ConfigurationSectionHandler,
NHibernate"/>
<appSettings>
<add key="BusinessObjectAssemblies" value="Keeper.API"></add>
<add key="ConnectionString" value="Server=localhost\SQLSERVER2005;Database=KeeperDev;User=test;Pwd=test;"></add>
<add key="ClientValidationEnabled" value="true"/>
<add key="UnobtrusiveJavaScriptEnabled" value="true"/>
</appSettings>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
<property name="dialect">NHibernate.Dialect.MsSql2000Dialect</property>
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property>
<property name="connection.connection_string">Server=localhost\SQLServer2005;Database=KeeperDev;User=test;Pwd=test;</property>
<property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property>
</session-factory>
</hibernate-configuration>
Haben Sie versucht NHibernate.Dialect.MsSql2000Dialect, NHibernate –
Phill