I use LDAP
for authenticating users to my website (DirectoryEntry,DirectorySearcher)
. so my users enter their active directory user and password for entering to webpage.
Now I want to add windows authentication capability to my website too.
I used <authentication mode="Windows"/>
in web.config
file and configured IIS
, but when I Open the website, browser logging page is appeared but I want to show my favorite logging page and user just selects window authentication and enter login button to logging to website.
How to authenticate a windows authentication user in code behind?