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. ASP page needs to copy database files to local machine, arh!

ASP page needs to copy database files to local machine, arh!

Scheduled Pinned Locked Moved ASP.NET
databasecomsysadminquestion
3 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.
  • S Offline
    S Offline
    shockwavepulsar
    wrote on last edited by
    #1

    Here's what I need to do. The web interface shows a bunch of files that have been backed-up into a database. The user can then look through the files (works fine) and select the ones they would like to restore and the place they would like them restored too. This works fine if they would like to restore the file to the machine the web server is running on, but not if they want to save the file to their local machine. Also, they have the option of inserting a disc with the file on it, and restoring it with that. However the programm looks for a disc in the server machine, not the local one. The files the will be restoring are not stored on teh web server, just on the same machine the server is running on. I've looked as filesystem objects, activeX controlls, ADODB streams, ftp stuff and DHTML client/server controlls and have come up with no solution. Is this even possible?!?

    J 1 Reply Last reply
    0
    • S shockwavepulsar

      Here's what I need to do. The web interface shows a bunch of files that have been backed-up into a database. The user can then look through the files (works fine) and select the ones they would like to restore and the place they would like them restored too. This works fine if they would like to restore the file to the machine the web server is running on, but not if they want to save the file to their local machine. Also, they have the option of inserting a disc with the file on it, and restoring it with that. However the programm looks for a disc in the server machine, not the local one. The files the will be restoring are not stored on teh web server, just on the same machine the server is running on. I've looked as filesystem objects, activeX controlls, ADODB streams, ftp stuff and DHTML client/server controlls and have come up with no solution. Is this even possible?!?

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      Lets clear a few things up first; ASP.NET runs on a web server, so its safe to assume that any running code (such as reading a database, filesystem operations etc) will all be occuring on the server. The client is using a web browser as an interface to your "program", they could be on the network, or over the internet - it doesnt matter. Its safe to assume that for security reasons, your code running on the server cannot affect the client computer except within tight limitations (eg, setting a cookie). This is a good thing - you wouldn't want to visit a website and have them download a file to your computer without your knowledge. Now, onto your question(s). Yes what you are trying to do is more than possible, if you have the browsing already setup then you just need to setup a downloader for the file and the user can select where they want to save it to (c: drive/floppy drive etc). Look at Response.BinaryWrite to write out a binary stream which the browser will interpret as a file download.

      S 1 Reply Last reply
      0
      • J J4amieC

        Lets clear a few things up first; ASP.NET runs on a web server, so its safe to assume that any running code (such as reading a database, filesystem operations etc) will all be occuring on the server. The client is using a web browser as an interface to your "program", they could be on the network, or over the internet - it doesnt matter. Its safe to assume that for security reasons, your code running on the server cannot affect the client computer except within tight limitations (eg, setting a cookie). This is a good thing - you wouldn't want to visit a website and have them download a file to your computer without your knowledge. Now, onto your question(s). Yes what you are trying to do is more than possible, if you have the browsing already setup then you just need to setup a downloader for the file and the user can select where they want to save it to (c: drive/floppy drive etc). Look at Response.BinaryWrite to write out a binary stream which the browser will interpret as a file download.

        S Offline
        S Offline
        shockwavepulsar
        wrote on last edited by
        #3

        Thankyou thankyou thankyou! I'll look into that now! I agree that is it a good thing a website cannot just install files on your computer. However my clients who will have this running on their intranet don't care about that, they just want it done! I've been working in ASP for about a month now and this makes me the reining ASP expert at my company... Thanks for your advise!

        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