If you are using connection string similar to this:

<add key="sql_connectionstring" value="Data Source=.\SQLEXPRESS;Initial Catalog=acdb;Integrated Security=True;Connect Timeout=30;User Instance=False;Context Connection=False" />

on local IIS server you need to be sure to create login for DefaultAppPool (or any other AppPool you are using)

Here is how:

1. In SQL Server Management Studio, look for the Security folder (the security folder at the same level as the Databases, Server Objects, etc. folders...not the security folder within each individual database)

2. Right click logins and select "New Login"

3. In the Login name field, type "IIS APPPOOL\YourAppPoolName" (do not click search!)

4. In "User mapping" map acen databases to this login and set database role membership (db_datareader, db_datawriter, db_owner)

5. Click OK

Knowledge base