CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: HTTPS Upload

  1. #1
    Join Date
    Aug 2010
    Posts
    3

    HTTPS Upload

    Hi Guru,

    I am new here. Can you please guide me on how to do the HTTPS Upload?

    Thanks,
    kiko_m

  2. #2
    Join Date
    Aug 2010
    Posts
    3

    Re: HTTPS Upload

    Gurus,

    When I'm using the following:

    Code:
    WebClient wc = new WebClient();
    NetworkCredential nc = new NetworkCredential();
    nc.UserName = _username;
    nc.Password = _pwd;
    wc.Credentials = nc;
                
    
               
                
    wc.UploadFile("https://xxx.xxx.xxx/TEST/test.csv", "C:\\test.csv");
    I get the following error:
    Code:
    The remote server returned an error: (404) Not Found.
    any ideas guys?

  3. #3
    Join Date
    Sep 2000
    Location
    FL
    Posts
    1,452

    Re: HTTPS Upload

    Error 404 is the webserver telling you that the file you requested does not exist.

    if you paste...

    https://xxx.xxx.xxx/TEST/test.csv

    into a web browser, you should get the same error. My guess is you want something like...'


    https://xxx.xxx.xxx/TEST/test.asp OR
    https://xxx.xxx.xxx/TEST/test.aspx OR
    https://xxx.xxx.xxx/TEST/test.html OR
    https://xxx.xxx.xxx/TEST/test.php

  4. #4
    Join Date
    Aug 2010
    Posts
    3

    Re: HTTPS Upload

    Hi sotoasty,

    Thank you for your reply.

    My goal here is just to upload a plain text file in the TEST directory. That is why i used the test.csv in the wc.Upload()

    So it is not actually a page that i want to open in a browser.

    Thanks.

  5. #5
    Join Date
    Aug 1999
    Location
    <Classified>
    Posts
    6,882

    Re: HTTPS Upload

    Using HTTP(s) upload, you can not upload to a directory, you can only POST to a page, so you need a page which can take this.

    http://www.csharpfriends.com/Article...?articleID=115

    http://articles.techrepublic.com.com...1-5109284.html
    Regards,
    Ramkrishna Pawar

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured