?
Solved

Network authentication

Posted on 2011-04-19
2
Medium Priority
?
269 Views
Last Modified: 2012-05-11
How can I have a user supply their domain creditials and have them validated by the network? user and password.
0
Comment
Question by:thenrich
  • 2
2 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 2000 total points
ID: 35424507
USe following function


Function AuthenticateUser(path as String, user As String, pass As String) As Boolean
    Dim de As New DirectoryEntry(path, user, pass, AuthenticationTypes.Secure)
    Try 
        'run a search using those credentials.  
        'If it returns anything, then you're authenticated
        Dim ds As DirectorySearcher = New DirectorySearcher(de)
        ds.FindOne()
        Return True
    Catch
        'otherwise, it will crash out so return false
        Return False
    End Try 
End Function

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question