FTP Connection, Error 530

Posts 1–3 of 3 · Page 1 of 1
FTP Connection, Error 530
I was trying to set up a Login system earlier today, and because my webhost request a password to access files, Im stuck.

Here is my code:

Code:
Imports System.Net
Imports System.Net.WebClient

Public Class Form1





    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim User As String
        Dim Pass As String
        Dim request As Net.FtpWebRequest = Net.FtpWebRequest.Create(URL)
       request.Credentials = New Net.NetworkCredential(" USERNAME", " PASSWORD") 
 //Added This, But URL Is not declared. Tried declaring and got new errors.
        User  = TextBox1.Text                            
        Pass = TextBox2.Text
        Dim wc = New WebClient

        Dim string01
        Dim string02

        string01 = wc.DownloadString("ftp:// HIDDEN")
        string02 = wc.DownloadString("ftp:// HIDDEN")
        If string01.contains(User) Then
            If string02.contains(Pass) Then
                Form2.Show()
                MsgBox("Log in Successful.")
            End If
        End If


    End Sub

End Class

I Censored my Details, yes. they were there correctly.
Erm, do you even know what you were doing lol? Plus I doubt the error is a 530, seeing as it's not even an official HTTP status code.

You created the request with the right credentials, then didn't even use it lol. You just made a brand new WebClient object without any credentials and then used that for the FTP request.
Dim request As Net.FtpWebRequest = Net.FtpWebRequest.Create(URL)
request.Credentials = New Net.NetworkCredential(" USERNAME", " PASSWORD")
is not my code, I've been googling all day for a fix, the error I get is.
Code:
The remote server returned an error: (530) Not logged in.


@Jason
Any Suggestions anyway?
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?