4
votes

I want to know how to do Active Directory Authentication.

Here is what I need in more detail -

I have 2 sets of users for my website Internal users and external users

Internal users will have a active directory name tied to them , if an internal user accesses the website he shouldn't be prompted with the Login page, Because he has already logged in to his windows machine which is tied to AD with a username and password.

External Users are the ones who are accessing the website from outside world (windows machine not on AD) , these users have to be redirected to a Login page to authenticate themselves with a ADUsername and ADPassword.

Hope I am clear

Kindly help

3

3 Answers

2
votes

I'm not sure if there is an easy way to do this. Typically a website is configured either for Windows authentication or Forms authentication.

You may be able to achieve this by having two websites set up in IIS using the same code base but different web.config

For example:

Internal users to to http://internal.application.com which is configured in IIS to use windows authentication. The web.config settings would be set to Windows.

External users goto http://www.application.com which is configured in IIS to use anonymous access and the web.config settings would be set to Forms and a login url specified.

0
votes

Have a look in the Anonymous Access and authentication control section of yous IIS config

0
votes

Imagine this scenario:

Set two IP addresses on your Web Server Network Adapter as the following:

192.168.1.100/24

192.168.1.10/24

Create a Host or Alias DNS Record as the following:

Microsoft.com --> 192.168.1.100

Create two hosts on your Web Server (IIS) as the following:

Test0 that works with 192.168.1.100/24

Test00 that works with 192.168.1.10/24

on the Test00 disable the Anonymous Authentication and Enable the Windows Authentication (Be noted that Windows Authentication should be marked while installing IIS)!

Create an Internet DNS Record for the Public IP of your Router & on your router set the port forwarding of TCP/80 on this IP Address 192.168.1.10/24 That's it!