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. Upload file to server from windows application

Upload file to server from windows application

Scheduled Pinned Locked Moved C#
sysadmintutorialquestion
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.
  • M Offline
    M Offline
    MayyMagdy
    wrote on last edited by
    #1

    Hi all, I'm trying to write some code to upload files from the machine where the windows application is installed to a server, for example from "C:\MyFolder\file.wav" to "http://ip/Project/folder/file.wav". I tried: WebClient objClient = new WebClient(); objClient.UploadFile(ServerURL, LocalFile); but it always give me this exception: An exception occurred during a WebClient request. InnerException = {"Unable to write data to the transport connection: An established connection was aborted by the software in your host machine."} Any idea? Thanks.

    E 1 Reply Last reply
    0
    • M MayyMagdy

      Hi all, I'm trying to write some code to upload files from the machine where the windows application is installed to a server, for example from "C:\MyFolder\file.wav" to "http://ip/Project/folder/file.wav". I tried: WebClient objClient = new WebClient(); objClient.UploadFile(ServerURL, LocalFile); but it always give me this exception: An exception occurred during a WebClient request. InnerException = {"Unable to write data to the transport connection: An established connection was aborted by the software in your host machine."} Any idea? Thanks.

      E Offline
      E Offline
      Ed Poore
      wrote on last edited by
      #2

      Is a firewall blocking the port?


      My Blog[^]

      M 1 Reply Last reply
      0
      • E Ed Poore

        Is a firewall blocking the port?


        My Blog[^]

        M Offline
        M Offline
        MayyMagdy
        wrote on last edited by
        #3

        how can i be sure of this? i don't have firewall installed!!

        J 1 Reply Last reply
        0
        • M MayyMagdy

          how can i be sure of this? i don't have firewall installed!!

          J Offline
          J Offline
          Justin Perez
          wrote on last edited by
          #4

          If you don't have a firewall installed, the windows firewall is probably running. Look in the security center on the control panel, and see if the windows firewall is running. If so, add the port you are using to the exclusions list and try it again.

          I'm going to become rich when I create a device that allows me to punch people in the face over the internet. "If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer

          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