Results 1 to 3 of 3

Thread: Using Built-in Windows Auth

  1. #1

    Thread Starter
    Member EagleEye's Avatar
    Join Date
    May 2002
    Location
    South Carolina, USA
    Posts
    43

    Using Built-in Windows Auth

    I want to make users login to my programs but do not want them to have to remember another password. I don't want them to have to logoff the current windows session either.

    Example:

    Worker A is logged into windows but Manager 1 needs to show User A a report that he does not have permission to bring up. So, using the same login and password that is used to log into windows Manager 1 logs into the program and pulls up the report while Worker A remains logged into the computer.

    Anyone know how verify windows 200 users/passwords using VB.net?
    Eagle Eye

    "Programming is easy ... when you are done."

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    If there is its with the Principal and Identity objects in the System.Security namespace, try searching the help for 'Impersonating and Reverting'.

  3. #3
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    This may do what you want.

    VB Code:
    1. Public Function VerityUser(ByVal UserName As String, ByVal Password As String, ByVal Domain As String) As Boolean
    2.         Try
    3.             Dim Entry As DirectoryEntry = New DirectoryEntry("LDAP://" & Domain, UserName, Password)
    4.             Dim Search As DirectorySearcher = New DirectorySearcher(Entry)
    5.             Dim results As SearchResult
    6.             results = Search.FindOne
    7.             Return True
    8.         Catch Err As Exception
    9.             Return False
    10.         End Try
    11.     End Function

    Jeremy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width