Create SQL Server Login for IIS APPPOOL - IIS and SQL Server on different machines Create SQL Server Login for IIS APPPOOL - IIS and SQL Server on different machines asp.net asp.net

Create SQL Server Login for IIS APPPOOL - IIS and SQL Server on different machines


One solution to your problem would be to set up a separate (not built-in) account for the application pool. You could give that account minimal rights and also give the access to SQL Server.

This way you could use a domain account which is easy to set up but still control security tightly.


I know this question is old, but since I suffered till I got it work, I'd like to share my experience to answer this question.

The steps you have followed worked with me, except :

3- The account you need to add to sql server logins is mydomain\machine1$ not mydomain\machine1$\IIS APPPOOL\MyAppPoolName

4- leave every thing in general settings page as defaults (actually, you need to make sure you are using windows authentication).

Then Go to User Mappings | select the database you want your application to access | grant it whatever permissions you want. For example, give it db_datareader & db_datawriter permissions.

5- Click OK to save.

But be ware that all applications using virtual accounts from same machine will be able to access this database.