When I set up a regular connection, it works, however, when I try to use nhibernate, hibernate.cfg.xml, I get the following error.
Message = "A network-related or specific instance error occurred while establishing a connection with SQL Server. The server was not found or is unavailable. Verify the instance name is correct and configure SQL Server for remote access (provider: SQL network interfaces, error: 26 - server location error / instance) "Source =" .NET SqlClient Data Provider "
What will be the reason for this and how can I solve it?
I doubt this is a network or sql server configuration error.
<?xml version="1.0" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.MsSql2005Dialect</property> <property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> <property name="connection.connection_string">Server=(ServerName\DEV_ENV);Initial Catalog=dbName;User Id=SA;Password=PASS</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.LinFu.ProxyFactoryFactory, NHibernate.ByteCode.LinFu</property> </session-factory> </hibernate-configuration>
Darthvader
source share