Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. File Upload in Windows Application ?

File Upload in Windows Application ?

Scheduled Pinned Locked Moved C#
questioncsharpsysadminhelp
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kamal Afridi
    wrote on last edited by
    #1

    Hi how can i upload a file from desktop application to a web directory. I am using following code. string fileName = @"E:\queries.txt"; System.Net.WebClient client = new WebClient(); client.UploadFile("http://ef-kam/Compaq/working/" + fileName, "PUT", fileName); But i am getting following exception. "The remote server returned an error: (501) Not Implemented."

    Know Yourself Then Grow Yourself.

    G 1 Reply Last reply
    0
    • K Kamal Afridi

      Hi how can i upload a file from desktop application to a web directory. I am using following code. string fileName = @"E:\queries.txt"; System.Net.WebClient client = new WebClient(); client.UploadFile("http://ef-kam/Compaq/working/" + fileName, "PUT", fileName); But i am getting following exception. "The remote server returned an error: (501) Not Implemented."

      Know Yourself Then Grow Yourself.

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The PUT method is disabled by default in the web server. You have to enable it for the server to accept it.

      --- b { font-weight: normal; }

      K 1 Reply Last reply
      0
      • G Guffa

        The PUT method is disabled by default in the web server. You have to enable it for the server to accept it.

        --- b { font-weight: normal; }

        K Offline
        K Offline
        Kamal Afridi
        wrote on last edited by
        #3

        thanks can u please tell me how i can enable it.

        Know Yourself Then Grow Yourself.

        V 1 Reply Last reply
        0
        • K Kamal Afridi

          thanks can u please tell me how i can enable it.

          Know Yourself Then Grow Yourself.

          V Offline
          V Offline
          Vasudevan Deepak Kumar
          wrote on last edited by
          #4

          Check out this article http://www.codeproject.com/cs/webservices/DimeBufferedUpload.asp[^]

          Vasudevan Deepak Kumar Personal Homepage Tech Gossips

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups