0

Hello,

I was wondering if somebody could help me...

I have created a user login page for my website in VB.Net and ASP.Net.

At the moment, a user logs in with a username and password that has been hardcoded in to my script.

I now need to take it further by removing the hardcoded username and password and coding it so that when the user provides their credentials, my program goes to the virtual FTP server I am using and compares with the credentials for that user in the Active Directory.

Is this possible? if so, what would I need to look into to be able to accomplish this?

My code so far is as follows:

<script runat= "server">
            Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click

                Dim Username As String
                Dim Password As String

                Username = "username"
                Password = "password"

                If txtUsername.Text = "" Then
                    MsgBox("Please provide a username!")
                End If

                If txtPassword.Text = "" Then
                    MsgBox("Please provide a password!")
                End If

                If txtUsername.Text = username And txtPassword.Text = password Then
                    Response.Redirect("NextPage.aspx")
                Else
                    MsgBox("Please provide correct credentials!")
                End If

            End Sub
    </script>

Any help and advice will be greatly appreciated.

Thanks,

Dan

Edited by dwinn: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by dwinn
0

Hi aspproject,

Thank you for your post.

Ok then, I understand that I will need a username, password and hostname but could you possibly explain it to me a bit more?

Thanks,

Dan

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.