I'm new to NHibernate and am trying to build a simple app that uses NHibernate to store presist information to a SQL database. I'm using Visual Web Developer 2005 Express Edition. When I run the program I get the following error:
NHibernate.HibernateException: The hibernate.connection.driver_class must be specified in the NHibernate configuration section.
at NHibernate.Connection.ConnectionProvider.ConfigureDriver(IDictionary settings)
at NHibernate.Connection.UserSuppliedConnectionProvider.Configure(IDictionary settings)
at NHibernate.Connection.ConnectionProviderFactory.NewConnectionProvider(IDictionary settings)
at NHibernate.Cfg.SettingsFactory.BuildSettings(IDictionary properties)
at NHibernate.Cfg.Configuration.BuildSettings()
at NHibernate.Cfg.Configuration.BuildSessionFactory()
my hibernate.cfg.xml file is located in the Bin dictory and looks like:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section
name="nhibernate"
type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
/>
</configSections>
<nhibernate>
<add
key="hibernate.connection.provider"
value="NHibernate.Connection.DriverConnectionProvider"
/>
<add
key="hibernate.dialect"
value="NHibernate.Dialect.MsSql2000Dialect"
/>
<add
key="nhibernate.connection.driver_class"
value="NHibernate.Driver.SqlClientDriver"
/>
<add
key="hibernate.connection.connection_string"
value="[...]"
/>
</nhibernate>
</configuration>
Any and all ideas are welcome. Thanks in advance.
|