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

if you want to login in FTP using ASP.net then username, password and hostname you need to provide for login FTP using asp.net

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.