Search code examples
asp.netsql-serveriisactive-directorywindows-authentication

Configure IIS to connect to SQL Server using Active Directory account


I have created a group on AD, and configured this group to have access to my SQL Server. With it, any .Net app, SQL Server and SSIS are able to connect to SQL Server using any AD account that's on that group, they just need to set Trusted Connection/Windows Authentication.

Now I need to do the same on IIS apps. But I have never configured IIS and don't know how to do it. I Googled it, but everything refers to user authenticating to IIS using NTLM, not IIS connecting to SQL Server.


Solution

  • For Server2008 and higher you will likely want to use Application Pool Identity. This article helped get me going when I set up an IIS / SQL Application.

    http://www.iis.net/learn/manage/configuring-security/application-pool-identities

    EDIT: Specifically where it demonstrates how to use a built in account there is an option to choose a custom account. https://thycotic.force.com/support/s/article/Running-Secret-Server-IIS-Application-Pool-with-a-Service-Account

    EDIT2: Using windows auth - https://blogs.msdn.microsoft.com/chiranth/2014/04/17/setting-up-kerberos-authentication-for-a-website-in-iis/