title: IIS7, SQL 2008 and ASP.NET MVC security
body: <p>I have an ASP.NET MVC application that I'm working on. I've been developing it on Windows Server 2003 with IIS6 and SQL 2008 Express, and everything was working great. I recently decided to try out the Windows 7 beta, so now I'm using IIS7, and have run into a problem with connectivity to my database that I can't seem to figure out.</p>
  
  <p>I can run/debug the app just fine, but whenever I try to access a page that needs to access the database, I get the following error:</p>
  
  <p>"Cannot open database "MyDatabaseName" requested by the login. The login failed.
  Login failed for user 'IIS APPPOOL\MyApplicationName'."</p>
  
  <p>I've obviously got some security configuration setup incorrectly, but I can't seem to find any good documentation on <em>how</em> to set it up correctly. I've tried giving NETWORK SERVICE permissions on the database, but that didn't seem to work. Anyone know what I need to do to give "IIS APPPOOL\MyApplicationName" permissions to this database? Am I missing something obvious?</p>
  
  <p>Thanks...</p>