Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Make sure networking is enabled on your SQL server, see here : http://technet.microsoft.com/en-us/library/hh231672.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900