Problem with WebClient class


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problem with WebClient class

Hybrid View

  1. #1
    news://news.devx.com Guest

    Problem with WebClient class

    Hello,
    I have problem with upload a file to IIS server. If I use UploadFile (from
    System.Net.WebClient class) method in way UploadFile(uriString, "POST",
    fileName) but I receive error message: Error 405 - method not allowed
    If I use "PUT" instead of "POST" then this file is uploaded to server but
    this file has additional content.
    For example:
    If I have text file with only 2 lines:
    Pawel
    End

    then after uploading this file to server its content is:
    -----------------------8c4b770cd594720
    Content-Disposition: form-data; name="file"; filename="pawel.txt"
    Content-Type: application/octet-stream

    Pawel
    End
    -----------------------8c4b770cd594720

    Can you help ? Thanks a lot.

    Paweł Przybyła




  2. #2
    Kuku Guest

    Re: Problem with WebClient class


    Hello

    >What's the point to use UploadFile.....?
    >Do you have wife..?
    >Let her do it !!!!



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center