Click here to Skip to main content
12,749,285 members (35,165 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# HTML HTTP
I'm trying to make an auto uploader to websites with C#
For instance, I'm trying to create an auto uploader for websites like,, shareflare, letitbit etc...
The website asks the user to check the "I agree to Terms of Service" and asks him to enter an email.

P.S I searched the internet a bit and I found this[^].
However, it did not work with multiupload and fileflyer (which are fundamental for me to accomplish this).
Can anyone give me a small example or some info about that? an example would be perfect
Thanks from advance, Adam.
Posted 3-Jun-12 4:55am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

you have to look up for API in your target sites, a web service maybe!
then include it in your projects, and then read their documents to config!
but if you want just upload file to server use this code snippet:
private void SaveTToWeb()
        //create WebClient object
        WebClient client = new WebClient();
        string myFile = @"C:\file.txt";
        client.Credentials = CredentialCache.DefaultCredentials;
        client.UploadFile(@" Results/RK/myFile", "PUT", myFile);
    catch (Exception err)

and if you want to use ftp, read this:
C# ftp upload[^]
sahabiswarup 13-Feb-13 1:53am
i've tried your code but getting an error
“The remote server returned an error: (405) Method Not Allowed.”

can you please help me to get out of this?
taha bahrami 24-Mar-13 8:24am
All 405 errors can be traced to configuration of the Web server and security governing access to the content of the Web site.
check if you have the permission to access that root on your server!
DilaraSina 1-Dec-16 5:04am
I've permission to access that root, but i'm getting this error. Do you know what else may cause that?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170215.1 | Last Updated 3 Jun 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100