I was looking for something too complicated. I allowed my two nHibernate config files to get out of sync (duplicate code!!).
Sorry to take up your forum space. peace, tqii On Mar 24, 9:42 am, tqwhite <[email protected]> wrote: > I have a working starter project in asp.net mvc with nHibernate > driving SQL Server. I have an mbUnit test solution set up that works, > too. It can access my application and get nice results. > > Except... > > It won't make Sql Server work. I get: > > System.Data.SqlClient.SqlException: A connection was successfully > established with the server, but then an error occurred during the > login process. (provider: Named Pipes Provider, error: 0 - No process > is on the other end of the pipe.) > > The code I execute in the test works inside the application: > > Configuration config = new NHibernate.Cfg.Configuration(); > config.Configure(); > ISessionFactory sessionFactory = > config.BuildSessionFactory(); > ISession session = sessionFactory.OpenSession(); > > IQuery query = session.CreateQuery("from SchoolInfo"); > List<SchoolInfo> dbResult = > (List<SchoolInfo>)query.List<SchoolInfo>(); > > I also note that I can cause nHibernate to generate a database schema > proving that the test setup can access the application's nHibernate > mapping file. > > I also have a copy of the nHibnerate config file, as an embedded > resource, in the test solution. (I also tried it as content, just for > good measure, with the same result.) > > To make it more frustrating, I was, at one time, able to cause the > test setup to to generate an nHibernate database update schema, > proving that, at some time in the past, it was able to access SQL > Server. > > Does anyone know why I am having this problem? > > tqii -- You received this message because you are subscribed to the Google Groups "MbUnit.User" 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/mbunituser?hl=en.
