Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 517509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:50:29+00:00 2026-05-13T07:50:29+00:00

I have an active Directory (window) on the server ..and i want to connect

  • 0

I have an active Directory (window) on the server ..and i want to connect it with my web pages..

this is my vb code:

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Data
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.DirectoryServices ' cannot be found '
Imports System.Runtime.InteropServices
Imports System.Configuration
Imports System.Data.SqlClient
Partial Class Default3
    Inherits System.Web.UI.Page




    Public Function IsADUser(ByVal UserName As [String], ByVal Password As [String]) As [Boolean]
        Dim entry As New DirectoryEntry()
        entry.Username = UserName
        entry.Password = Password
        Dim searcher As New DirectorySearcher(entry)
        searcher.Filter = "(objectclass=user)"
        Dim Authentecated As [Boolean] = False
        Try
            searcher.FindOne()
            Authentecated = True
        Catch ex As COMException
            Authentecated = False
        End Try
        Return (Authentecated)
    End Function

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub
End Class
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:50:29+00:00Added an answer on May 13, 2026 at 7:50 am

    The ASP.NET Membership supports Active Directory as well. Check it out:

    http://msdn.microsoft.com/en-us/library/ms998360.aspx

    To use Active Directory manually, you should add System.DirectoryServices.dll as a reference before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have code which as been working against an older Active Directory server and
There's Active directory on windows 2000 advance server, I have a web server on
I have a website which using active directory authorization on a windows server in
I have a server executable that talks to Active Directory to retrieve user information.
I have a web app that uses the Active Directory Membership Provider and when
I have the following code that loads a user's Active Directory DirectoryEntry object from
I have an ASP.NET application that authenticates users using Ldap against active directory. This
I've got a windows server 2008R2 with an active directory. I want to create
I am currently using windows server 2008 machine. I have active directory and sharepoint
I have a CA in windows server 2003 along with active directory (in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.