01-04-2012, 01:39 PM
Alright, well now that I got my program working I need to make it so I can share it with other users.
Instead of having my Username and Password in the source, I want it to be "TextBox1.Text and TextBox2.Text.
I know this is an easy fix, I just have never had to do this so I'd appreciate it if someone helped.
My Code:
Problem:
request.Credentials = New System.Net.NetworkCredential(("Textbox1.Text"), ("Textbox2.Text"))
Doesn't show up as an Error, but when you use the program its self it doesn't log you in.
===
I will be willing to give the full source to a few users that I think would actually try to fix it.
If you help fix this, and would like to continue helping with problems I would greatly appreciate it and I will put you in the credits.
AIM:x.Epiphany (Preferred)
Instead of having my Username and Password in the source, I want it to be "TextBox1.Text and TextBox2.Text.
I know this is an easy fix, I just have never had to do this so I'd appreciate it if someone helped.
My Code:
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim request As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://ftp.drivehq.com/My+Documents/file.exe"), System.Net.FtpWebRequest)
request.Credentials = New System.Net.NetworkCredential(("Textbox1.Text"), ("Textbox2.Text"))
request.Method = System.Net.WebRequestMethods.Ftp.UploadFile
Dim file() As Byte = System.IO.File.ReadAllBytes(TextBox3.Text)
Dim strz As System.IO.Stream = request.GetRequestStream()
strz.Write(file, 0, file.Length)
strz.Close()
strz.Dispose()
End Sub
Problem:
request.Credentials = New System.Net.NetworkCredential(("Textbox1.Text"), ("Textbox2.Text"))
Doesn't show up as an Error, but when you use the program its self it doesn't log you in.
===
I will be willing to give the full source to a few users that I think would actually try to fix it.
If you help fix this, and would like to continue helping with problems I would greatly appreciate it and I will put you in the credits.
AIM:x.Epiphany (Preferred)