TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
savan savani
NA
8
14k
Error in PrincipalContext.ValidateCredentials
Feb 19 2018 6:15 AM
I have used below code to authenticate user with Active Directory.
using
(PrincipalContext principalContext1 =
new
PrincipalContext(ContextType.Domain, domainName))
{
if
(principalContext1.ValidateCredentials(userName, password))
{
//code to successful login
}
}
Getting error "The server cannot handle directory requests." in ValidateCredentials method.
I have tried passing contextOptions as third parameter "ContextOptions.Negotiate | ContextOptions.Signing | ContextOptions.Sealing" in ValidateCredentials method.
It resolved my error, but I came to know from msdn that it is default parameter.
Why should I need to pass this? Any alternative solutions? Thanks in advance.
Reply
Answers (
2
)
Shared Drives - Domain ID
Can anyone suggest windows authentication on web api ?