accessing FTP Server

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • iwdu15

    #1

    accessing FTP Server

    hi, ive tried two ways of accessing an FTP server and neither worked. both
    threw an error saying "User Not Logged In"....so i have no idea how to do
    this....heres the code

    My.Computer.Net work.UploadFile ("FileName", "ftp://name.MyServer.n et",
    "UserName", "Password")

    and

    Dim c As New Net.NetworkCred ential
    Dim snd As Net.FtpWebReque st

    c.UserName = Me.txtUser.Text
    c.Password = Me.mtxtPass.Tex t

    For Each obj As Object In Me.lstAddedFile s.Items

    Dim tmp As String = obj.ToString
    Dim state As New FtpState

    snd = WebRequest.Crea te(New Uri(Me.txtWebSi te.Text.Trim & "/" &
    tmp.Substring(t mp.LastIndexOf( "\") + 1)))

    snd.Credentials = c
    snd.UseBinary = True
    snd.Method = Net.WebRequestM ethods.Ftp.Uplo adFile

    state.FileName = obj.ToString()
    state.snd = snd

    snd.BeginGetReq uestStream(Addr essOf FtpFileUploadCa llBack, state)

    Next

    any help would be great
    --
    -iwdu15
  • Terry Olsen

    #2
    Re: accessing FTP Server

    Usually "User not logged in" means that the credentials you sent were not
    correct. Try logging in to the ftp server manually and see if you are able
    to authenticate with the ID & Password you are sending.

    "iwdu15" <jmmgoalsteraty ahoodotcomwrote in message
    news:CD0F88ED-2299-4B95-ADD2-C877BC93F47F@mi crosoft.com...
    hi, ive tried two ways of accessing an FTP server and neither worked. both
    threw an error saying "User Not Logged In"....so i have no idea how to do
    this....heres the code
    >
    My.Computer.Net work.UploadFile ("FileName", "ftp://name.MyServer.n et",
    "UserName", "Password")
    >
    and
    >
    Dim c As New Net.NetworkCred ential
    Dim snd As Net.FtpWebReque st
    >
    c.UserName = Me.txtUser.Text
    c.Password = Me.mtxtPass.Tex t
    >
    For Each obj As Object In Me.lstAddedFile s.Items
    >
    Dim tmp As String = obj.ToString
    Dim state As New FtpState
    >
    snd = WebRequest.Crea te(New Uri(Me.txtWebSi te.Text.Trim & "/" &
    tmp.Substring(t mp.LastIndexOf( "\") + 1)))
    >
    snd.Credentials = c
    snd.UseBinary = True
    snd.Method = Net.WebRequestM ethods.Ftp.Uplo adFile
    >
    state.FileName = obj.ToString()
    state.snd = snd
    >
    snd.BeginGetReq uestStream(Addr essOf FtpFileUploadCa llBack,
    state)
    >
    Next
    >
    any help would be great
    --
    -iwdu15

    Comment

    • iwdu15

      #3
      Re: accessing FTP Server

      my login information is correct and it still says this....
      --
      -iwdu15

      Comment

      • Marcos de Lima Carlos

        #4
        Re: accessing FTP Server

        iwdu15 escreveu:
        my login information is correct and it still says this....

        Do you usually access esss TP through IE or another client?

        Marcos

        Comment

        • Marcos de Lima Carlos

          #5
          Re: accessing FTP Server

          Marcos de Lima Carlos escreveu:
          iwdu15 escreveu:
          >my login information is correct and it still says this....
          >
          >
          Sorry the correct question is this:
          Do you usually access this FTP through IE or another program?
          >
          Marcos

          Comment

          • iwdu15

            #6
            Re: accessing FTP Server

            nah, i always use Firefox.....saf er and better.....but why does this matter?
            this website isnt one thats required to be used in IE
            --
            -iwdu15

            Comment

            Working...