1

I want to authenticate my Users to Active Directory but without any login form.

I just want open my default page if user logged in to machine belongs to Active Directory.

Firstly, i used Windows Authentication but there is a requirement to authenticate user who belong to other domain as there are more than one domain.

1 Answer 1

1

For this, you need to use the System.DirectoryServices.AccountManagement namespace. Along with enabling Windows authentication, you need to write the authentication code in the Page_Load event of your default page. If the user is part of the required domain, authenticate him and show him the page. Otherwise, tell him that he doesn't have access.

This answer should get you going.

Sign up to request clarification or add additional context in comments.

2 Comments

but is it possible without windows authentication?
You need Windows authentication as this will give you the Windows username for the user, which you will use to dig into the Active Directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.