seckel
asked on
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.
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.
Hi seckel,
check this : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconthewindowsauthenticationprovider.asp
Regards!
B..M
mmarinov
check this : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconthewindowsauthenticationprovider.asp
Regards!
B..M
mmarinov
oops sorry thought you asked for forms authentication
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.
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.
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.
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.
ASKER
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...
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...
ASKER
nauman_ahmed
The link is good, but in C#. I need to know how to do this in vb.net.
The link is good, but in C#. I need to know how to do this in vb.net.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ihenry,
You are a genius! That was just what I needed. Thanks.
You are a genius! That was just what I needed. Thanks.
nah...just glad I could help :0)
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
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
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.
URL: http://www.codeproject.com/aspnet/adsi1.asp
You can define it as
LDAP://IP_ADDRESS
LDAP://DOMAIN_NAME
HTH, Nauman.
This was the format I needed:
LDAP://domain.ccc-xxxx.net
LDAP://domain.ccc-xxxx.net
<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:
</TR>
<TR>
<TD colSpan="2" align="right">
<asp:Button id="ProcessLogin" runat="server" CssClass="ThinButton" Text="Login"></asp:Button>
</TR>
<TR>
<TD colSpan="2">
<asp:Label id="InvalidPassword" runat="server" Visible="False" ForeColor="Red" Font-Size="Larger">Invalid
</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.FormsAuthenti
Response.Redirect("ManageO
Else
InvalidPassword.Visible = True
End If
End Sub
Aeros