title: SQL Server Express connection string / FluentNHibernate
body: <p>I'm having some issues with my connection string. I've been testing a lot of different strings and approaches and now I'm stuck. </p>
  
  <pre><code>private static void InitializeSessionFactory()
  {
      _sessionFactory = Fluently.Configure()
              .Database(MsSqlConfiguration.MsSql2008
                            .ConnectionString(
   @"Server=Data Source=.\SQLEXPRESS;DataBase=carDB.mdf;User ID=sa;Password=xxxSecretxxx;")
                            .ShowSql()
              )
              .Mappings(m =&gt;
                        m.FluentMappings
                            .AddFromAssemblyOf&lt;Car&gt;())
              .ExposeConfiguration(cfg =&gt; new SchemaExport(cfg).Create(true, false))
              .BuildSessionFactory(); 
      }
  </code></pre>
  
  <p>(I know I shouldn't be using 'sa' at all - why I've done so is solely because of lack of management software so I had to use the only account there were)</p>
  
  <p>I am using a SQL Server Express database.</p>
  
  <p>The exception I get is this:</p>
  
  <blockquote>
    <p><em>An invalid or incomplete configuration was used while creating a SessionFactory.<br>
    Check PotentialReasons collection, and InnerException for more detail.</em></p>
  </blockquote>
  
  <p>This is my inner exception</p>
  
  <blockquote>
    <p><em>A network-related or instance-specific error
    occurred while establishing a connection to SQL Server.<br>
    The server was not found or was not accessible.<br>
    Verify that the instance name is correct and that
    SQL Server is configured to allow remote connections.<br>
    (provider: SQL Network Interfaces,
    error: 26 - Error Locating Server/Instance Specified)</em></p>
  </blockquote>
  
  <p>Does anyone know how I should approach this? I've spent hours trying to get this to work.</p>