I want to support multiple databases. So added two NHibernate
configuration files, and initializing sessions.

 private void InitializeNHibernateSession()
        {
 NHibernateSession.Init(
                webSessionStorage,
                new string[] { Server.MapPath("~/bin/
Northwind.Data.dll") },
                new AutoPersistenceModelGenerator().Generate(),
                Server.MapPath("~/NHibernate.config"));

            NHibernateSession.Init(
               webSessionStorage1,
               new string[] { Server.MapPath("~/bin/
Northwind.Data.dll") },
               new AutoPersistenceModelGenerator().Generate(),
               Server.MapPath("~/NHHesiwareDB.config"));
}

I am using Sharp Architecture 1.0.0.0, MVC 1.0 and Fluent NHibernate.
This code workes fine on some machine.But gives error on my machine.
Error :-  An invalid or incomplete configuration was used while
creating a SessionFactory. Check PotentialReasons collection, and
InnerException for more detail.

  * Database was not configured through Database method.

Innerexception:- A network-related or instance-specific error occurred
while establishing a connection to SQL Server. The server was not
found or was not accessible. Verify that the instance name is correct
and that SQL Server is configured to allow remote connections.
(provider: SQL Network Interfaces, error: 26 - Error Locating Server/
Instance Specified)"

I am unable to identify root cause of this exception.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to