I am constructing my new application using the following structure.
App (Storing the solution files only)
--- App.Web (web.config including the NHibernate configuration)
--- App.BLL
--- App.BO (POCO objects)
--- App.DAL (NHibernateHttpModule and BaseDataAccess from Beansoftware)
The sessionFactory is configured inside the NHibernateHttpModule which located in the DAL assembly. It seems not able to read the configuration file in the web.config. I am able to create another configuration inside the DAL project but I don't want to scatter my configuration.
Moreover, is there any good sample or recommendation with n-tier architecture with NHibernate available?
Code reference:
http://www.beansoftware.com/ASP.NET-Tut ... g4Net.aspx
Error Message:
The hibernate.connection.driver_class must be specified in the NHibernate configuration section.
Hibernate version:
NHibernate 1.2.1.GA
Full stack trace of any exception that occurs:
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() at Mekim.SalaryPlanning.DAL.BaseDataAccess.getFactory() in C:\Projects\Web Application\branches\SalaryPlanning\SalaryPlanning.DAL\BaseDataAccess.vb:line 24 at Mekim.SalaryPlanning.DAL.BaseDataAccess.OpenSession() in C:\Projects\Web Application\branches\SalaryPlanning\SalaryPlanning.DAL\BaseDataAccess.vb:line 34 at Mekim.SalaryPlanning.DAL.NHibernateHttpModule.context_BeginRequest(Object sender, EventArgs e) in C:\Projects\Web Application\branches\SalaryPlanning\SalaryPlanning.DAL\NHibernateHttpModule.vb:line 25 at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Name and version of the database you are using:
SQL Server 2005