Iis – How to make website users authenticate against a remote Active Directory

active-directoryiis

Let's say I have the following setup:

  • Office network that has an Active Directory server
  • Off-site IIS server

I would like to turn off anonymous access on certain folders on the website with the same, so that users have to authenticate with their Active Directory credentials. I have two questions:

  • What are the steps to do this?
  • Is there a way to have a copy of AD on the IIS machine in case the office network goes down (power outage, etc)?

Best Answer

The normal steps to do this would be:

  1. Join the web server to the domain
  2. Enable Windows Authentication
  3. Set the appropriate NTFS ACLs on the folders that you want to secure
  4. Disable anonymous access to those folders

If the web server cannot me made a member of the domain, you can use third-party or home-grown code to forward the username and password to AD for authentication and only serve up the content upon successful auth, but this is substantially more work usually and implementation would be specific to your configuration.