Home All Groups Group Topic Archive Search About
Author
27 Aug 2006 11:53 PM
iwdu15
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.Network.UploadFile("FileName", "ftp://name.MyServer.net",
"UserName", "Password")

and

  Dim c As New Net.NetworkCredential
        Dim snd As Net.FtpWebRequest

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

        For Each obj As Object In Me.lstAddedFiles.Items

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

            snd = WebRequest.Create(New Uri(Me.txtWebSite.Text.Trim & "/" &
tmp.Substring(tmp.LastIndexOf("\") + 1)))

            snd.Credentials = c
            snd.UseBinary = True
            snd.Method = Net.WebRequestMethods.Ftp.UploadFile

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

            snd.BeginGetRequestStream(AddressOf FtpFileUploadCallBack, state)

        Next

any help would be great
--
-iwdu15

Author
28 Aug 2006 2:18 AM
Terry Olsen
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.

Show quoteHide quote
"iwdu15" <jmmgoalsteratyahoodotcom> wrote in message
news:CD0F88ED-2299-4B95-ADD2-C877BC93F47F@microsoft.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.Network.UploadFile("FileName", "ftp://name.MyServer.net",
> "UserName", "Password")
>
> and
>
>  Dim c As New Net.NetworkCredential
>        Dim snd As Net.FtpWebRequest
>
>        c.UserName = Me.txtUser.Text
>        c.Password = Me.mtxtPass.Text
>
>        For Each obj As Object In Me.lstAddedFiles.Items
>
>            Dim tmp As String = obj.ToString
>            Dim state As New FtpState
>
>            snd = WebRequest.Create(New Uri(Me.txtWebSite.Text.Trim & "/" &
> tmp.Substring(tmp.LastIndexOf("\") + 1)))
>
>            snd.Credentials = c
>            snd.UseBinary = True
>            snd.Method = Net.WebRequestMethods.Ftp.UploadFile
>
>            state.FileName = obj.ToString()
>            state.snd = snd
>
>            snd.BeginGetRequestStream(AddressOf FtpFileUploadCallBack,
> state)
>
>        Next
>
> any help would be great
> --
> -iwdu15
Author
28 Aug 2006 8:10 PM
iwdu15
my login information is correct and it still says this....
--
-iwdu15
Author
28 Aug 2006 8:51 PM
Marcos de Lima Carlos
iwdu15 escreveu:
> my login information is correct and it still says this....


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

Marcos
Author
28 Aug 2006 8:57 PM
Marcos de Lima Carlos
Marcos de Lima Carlos escreveu:
> iwdu15 escreveu:
>> my login information is correct and it still says this....
>
>    
Sorry the correct question is this:
Show quoteHide quote
> Do you usually access this FTP through IE or another program?
>
> Marcos
Author
29 Aug 2006 2:11 AM
iwdu15
nah, i always use Firefox.....safer and better.....but why does this matter?
this website isnt one thats required to be used in IE
--
-iwdu15