Hello all.
I'm having trouble setting things up for a windows application I'm using in order to do table mappings in nhibernate.
My App.config is set up as :
***************************************************
<?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/ </configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> <session-factory> <property name="hibernate.connection.provider"> NHibernate.Connection.DriverConnectionProvider </property> <property name="hibernate.connection.driver_class"> NHibernate.Driver.SqlClientDriver </property> <property name="hibernate.connection.connection_string"> Server=bsp-appdevxxx;Database=BSPDataCenter;User Id=runprog;Password=xxxxxxxxx </property> <property name="hibernate.dialect"> NHibernate.Dialect.MsSql2005Dialect </property> <property name="show_sql"> false </property> </session-factory> </hibernate-configuration> </configuration>
**************************** Using session to do the work:
*******************************
ISessionFactory sessionfactory;
Configuration config = new Configuration(); config.AddAssembly(typeof(classname).Assembly); sessionfactory = config.BuildSessionFactory();
***********************************
The final statement (BuildSessionFactory) results in the error
"The hibernate.connection.driver_class must be specified in the NHibernate configuration section."
even though I have it specified in the config file above
I'm sure the application is recognizing the App.Config, just not recognizing the properties designated within.
Any ideas?
Thanks
|