I am going to upload a file to a similar website http://www.zoneedit.com/auth/ ...
I have the user name & password but the website returns an error 401 Unauthorized.... is anybody who can guide me how to solve it
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
angelo cantillasPosted Jul 17, 2009, 10:32 PM
below is the code...
try
{
System.Net.ServicePointManager.CertificatePolicy = new MyPolicy();
WebClient Client = new WebClient();
Client.Credentials = new NetworkCredential("user", "Password", "https://dts.website.com");
Client.UploadFile("https://dts.website.com/upload_folder", "c:\myfile.txt");
}
catch (Exception expx)
{
MessageBox.Show(expx.Message);
}
I was given a user name & password by the administrator of the above website, but my program returns "error 401 Unauthorized"
username & password will work only f i'll open thier website in the internet Explorer but not from my program.
The administrator told me that the above username & password have enough rights to upload into the given website.
did miss somthing in my code?
naura paxPosted Jul 17, 2009, 5:16 AM
You cancel the authorization dialog box, you will be redirected to another page, where you to click on another link (free web page hosting link).
In that page cilck on Lost your password, or secure login. They might mail you new username password.