How do I authenticate form username/password against domain using Active Directory?

Using active directory, I need to know, in vb.net (not C#), how to authenticate the username and password from a login form.

I support the company intranet website and I need further security applied to the website by authenticating the user and password every time the user access the website.  

Please show example...in vb.net (not c#)  Thank you.
seckelAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AerosSagaCommented:
     <TABLE id="Table1" cellSpacing="0" cellPadding="5" width="250" border="1">
                                          <TR>
                                                <TD width="90">Password</TD>
                                                <TD style="TEXT-ALIGN: right" width="140">
                                                      <asp:TextBox id="Password" runat="server" CssClass="ThinInput" MaxLength="12" Columns="4" Width="137px"
                                                            TextMode="Password"></asp:TextBox></TD>
                                          </TR>
                                          <TR>
                                                <TD colSpan="2" align="right">
                                                      <asp:Button id="ProcessLogin" runat="server" CssClass="ThinButton" Text="Login"></asp:Button></TD>
                                          </TR>
                                          <TR>
                                                <TD colSpan="2">
                                                      <asp:Label id="InvalidPassword" runat="server" Visible="False" ForeColor="Red" Font-Size="Larger">Invalid password.</asp:Label></TD>
                                          </TR>
                                    </TABLE>
---------------------------------------------------------------------------------------------------
   Private Sub ProcessLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProcessLogin.Click
        If Password.Text = "8888" Or Password.Text = "pokey1" Then
            Web.Security.FormsAuthentication.RedirectFromLoginPage("Admin", False)
            Response.Redirect("ManageOrders.aspx")
        Else
            InvalidPassword.Visible = True
        End If
    End Sub

Aeros
0
AerosSagaCommented:
oops sorry thought you asked for forms authentication
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

ihenryCommented:
Hello seckel,

If I understand your question correctly, you need something like forms authentication where user enter their user name and password to login your intranet site. And currently the intranet site is using windows authentication. Am I right? please clarify.
0
AerosSagaCommented:
0
nauman_ahmedCommented:
The following MSDN Article describes exactly what you are trying to do:

Title: Active Directory Authentication from ASP .NET
URL: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sds/sds/active_directory_authentication_from_asp__net.asp

HTH, Nauman.
0
seckelAuthor Commented:
ihenry

I have a form that will get the user's name and password.  I then need to authenticate the user name and password against Active Directory (ADSI)...I know how to create the form, I need help with the ADSI logic portion...
0
seckelAuthor Commented:
nauman_ahmed

The link is good, but in C#.  I need to know how to do this in vb.net.
0
ihenryCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
seckelAuthor Commented:
ihenry,

You are a genius!  That was just what I needed.  Thanks.
0
ihenryCommented:
nah...just glad I could help :0)
0
Timothy GoldenWeb DevCommented:
ok so how do you get the LDAP path?
Dim adPath as String = "LDAP://DC=..,DC=.." 'Path to your LDAP directory server

i have tried this one:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;326340

but i don't know what to use for Path to your LDAP directory server

Dim adPath as String = "LDAP://DC=..,DC=.." 'Path to your LDAP directory server
0
nauman_ahmedCommented:
Check the following tutoria:

URL: http://www.codeproject.com/aspnet/adsi1.asp

You can define it as
LDAP://IP_ADDRESS
LDAP://DOMAIN_NAME

HTH, Nauman.
0
flatfoot64Commented:
This was the format I needed:

LDAP://domain.ccc-xxxx.net
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.