Posted on: 11/27/2012 1:01:08 AM | Views : 589

Hi I need to add ability for users to log in automaticly into web application with their windows user credentials. In application that I'm working on has the ability to login using your windows username and password. The way it works now is a) user enters his windows username, password b) With this info application tries to create DirectoryEntry and get NativeObject to ensure that info entered was valid.  
String domainAndUsername = domain + @"\" + username; DirectoryEntry entry = new DirectoryEntry(_path, domainAndUsername, pwd); try { //Bind to the native AdsObject to force authentication. DirectorySearcher search = new DirectorySearcher(entry2); search.Filter = "(SAMAccountName=" + username + ")"; search.Properties ...

Go to the complete details ...