Advertisement
| 04.23.2008 at 09:33AM PDT, ID: 23347295 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: |
Imports System.DirectoryServices
Partial Class _Default
Inherits System.Web.UI.Page
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim path As String = "LDAP://servername/ou=People,dc=domain,dc=com"
Dim User As String = "testuser"
Dim pass As String = "********"
Dim dirEntry As New DirectoryEntry(path, User, pass, AuthenticationTypes.Secure)
Try
Dim nat As Object
'if the NativeObject can be created using those credentials
'then they are valid.
nat = dirEntry.NativeObject
Me.lblAuthenticate.Text = "Authenticated"
Catch
Me.lblAuthenticate.Text = "Not Authenticated"
End Try
End Sub
End Class
|
| Microsoft |
| Apple |
| Internet |
| Gamers |
| Digital Living |
| Virus & Spyware |
| Hardware |
| Software |
| ITPro |
| Developer |
| Storage |
| OS |
| Database |
| Security |
| Programming |
| Web Development |
| Networking |
| Other |
| Community Support |
| 04.26.2008 at 08:56AM PDT, ID: 21445891 |