title: Add user to SQL Server 2008 - permission denied
body: <p>I have recently had <a href="https://stackoverflow.com/questions/524905/handleerror-attribute-does-not-seem-to-act-at-all">some problems</a> that I think might be helped by debugging my ASP.NET MVC application in <code>IIS</code> instead of with the default ASP.NET Development Server. However, when I try this the application can't access the database server (MS SQL Server 2008 Express) - it works fine on the Development Server though.</p>
  
  <p>The error I get is</p>
  
  <blockquote>
    <p><code>Cannot open database 'myDbName' requested by the login. The login failed.
    Login failed for user 'NT INSTANCE/NETWORK SERVICE'.</code></p>
  </blockquote>
  
  <p>I assume it worked before because the development server accessed the database through my user account, and not via the network service like <code>IIS</code>.</p>
  
  <p>I tried adding the user <code>NETWORK SERVICE</code> to the database, but it turns out I don't have the user privileges to do so - it doesn't matter that my Windows account that I log on to the server with is admin, or that I run the program in an administrator context. I just can't add another user to the DB.</p>
  
  <p>How do I solve this problem?</p>