title: Fluent NHibernate SQL Server 2012
body: <p>I'm developing a .net project and I use the first time SQL Server 2012 with fluent nhibernate when I running my project I get the following error =></p>
  
  <blockquote>
    <p>Value cannot be null.</p>
    
    <p>Parameter name: Data Source</p>
    
    <p>Description: An unhandled exception occurred during the execution of the current web request. Please        review the stack trace for more information about the error and where it originated in the code. </p>
    
    <p>Exception Details: System.ArgumentNullException: Value cannot be null.
    Parameter name: Data Source</p>
  </blockquote>
  
  <p>My configuration syntax</p>
  
  <pre><code>Fluently.Configure()
     .Database(
        MsSqlConfiguration.MsSql2012.ConnectionString(c =&gt; c.FromAppSetting("ConnectionString")))
        .Mappings(m =&gt; m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly()))
        .CurrentSessionContext&lt;T&gt;()
        .BuildSessionFactory();
  </code></pre>
  
  <p>and my connection string in <code>web.config</code>:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="ConnectionString" 
           connectionString="Data Source=localhost; Initial Catalog=ExcelReport; Integrated Security=true;" 
           providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>I've tried various ways but I couldn't fix the problem. Do you have any suggestion?</p>