I am using a windows service in which i am using a class NHibernate. In this file i have set the connection string as below:
private static void InitializeSessionFactory()
{
_sessionFactory = Fluently.Configure()
.Database(MsSqlConfiguration.MsSql2008
.ConnectionString(
@"Server=MNARK2012\SQLEXPRESS; Database=monrk126;Integrated Security=SSPI;")
)
.Mappings(m =>
m.FluentMappings
.AddFromAssemblyOf<resident>())
.ExposeConfiguration(cfg => cfg.SetProperty("adonet.batch_size", "100"))
.BuildSessionFactory();
}
This connection string when used inside NHibernate for setting up connection with SQL Express 2008 R2, it's not getting connected. But when i use the same connection string inside NHibernate and use SQL SERVER 2008 instead of SQL Express, it works perfectly fine.
Kindly help me out to resolve this error.
Thanks & Regards,
Mukesh Bhagat