title: Could Not Open the Database. Login Failed
body: <p>I have the following connection string:</p>
  
  <pre><code>&lt;connectionStrings&gt;
      &lt;add name="ContextName" connectionString="Data Source=.;Initial Catalog=ServerName;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>When I run my app, i receive the following error:</p>
  
  <blockquote>
    <p>Server Error in '/' Application, Cannot open database “” requested by
    the login. The login failed</p>
  </blockquote>
  
  <p>The error appears in this piece of code:</p>
  
  <pre><code>Hangfire.GlobalConfiguration.Configuration.UseSqlServerStorage("ContextName");
  </code></pre>
  
  <p>I am sure that the current user has all permissions. I have also tried idea from <a href="http://blog.sqlauthority.com/2009/08/20/sql-server-fix-error-cannot-open-database-requested-by-the-login-the-login-failed-login-failed-for-user-nt-authoritynetwork-service/" rel="nofollow">this</a> article, but it did not work. 
  Also I know that the database is not existing and I expect it to be created after the first get request.
  Any ideas how I could create the database without starting the app? Or how could I fix this problem in general?</p>