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. Web Development
  3. ASP.NET
  4. Upload files from client machine to server

Upload files from client machine to server

Scheduled Pinned Locked Moved ASP.NET
sysadmintutorialquestion
2 Posts 2 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 have a dll that will be installed and called from clients' machines. This should upload files form these machines to a server. I don't want to upload files directly to the server location. I want to create an ASPX and put it on the server. Then the dll should contact this page and pass to it file stream. And the ASPX should recieve and save the files on the server. I don't know how to access the aspx page and make it do actions (save files) from the dll. Any ideas? Thanks.

    H 1 Reply Last reply
    0
    • M MayyMagdy

      Hi All, I have a dll that will be installed and called from clients' machines. This should upload files form these machines to a server. I don't want to upload files directly to the server location. I want to create an ASPX and put it on the server. Then the dll should contact this page and pass to it file stream. And the ASPX should recieve and save the files on the server. I don't know how to access the aspx page and make it do actions (save files) from the dll. Any ideas? Thanks.

      H Offline
      H Offline
      hartertobak
      wrote on last edited by
      #2

      Hhmm, I´m not sure if I got you right. The dll is on the client an uploads the file to the aspx? So you can just post the file to the aspx: private void Page_Load(object sender, System.EventArgs e) { foreach(string file in Request.Files.AllKeys) { HttpPostedFile theFile = Request.Files[file]; file.SaveAs(Server.MapPath("DestinationFolder") + "\\" + file.FileName); } } This should do the file-saving for you. Why do you use a dll to upload a file? Did you had a look on MTOM[^]?(Awesome article!)

      ASP.NET SEO Blog

      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