Uploading .jpg - WebClient .UploadData method returns (404) Not Found

Discussion in 'ASP.NET / ASP.NET Core' started by Bruce, Jul 24, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Bruce

    Bruce DiscountASP.NET Staff

    i think you are using the wrong class. system.net.webclient is a web client class which allows your application to emulate as a browser.

    when you call the UploadData() method, the web client actually do a Post to http://xxxx/prop_images/test2.jpg

    This will, of course, fail because the jpg file does not know how to handle the data.

    There are many articles that talk about how to do file upload on the net, i found a couple that should help you

    http://www.codeproject.com/aspnet/fileupload.asp

    http://www.4guysfromrolla.com/webtech/091201-1.shtml






    Bruce

    DiscountASP.NET
    www.DiscountASP.NET

    Post Edited (bruce [DASP]) : 1/10/2007 6:52:28 PM GMT
     
  2. Drake

    Drake Guest

    Post Edited (Drake) : 1/5/2007 4:40:12 AM GMT
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page