file copy operation

  • Thread starter Thread starter djc
  • Start date Start date
D

djc

I'm hoping someone can point me in the right direction as to what I need to
read up on in order to accomplish this: (what classes, methods, etc.. and/or
general guidance)

I want to provide a link on our intranet site that when clicked will copy a
file from a server (not the server that IIS is runing on) to the client
machine. This is a front-end file for a database system that is updated
often. I want to provide users a way to easily grab the latest copy for
their machine without them having to know where to get it or where to put
it.

any info is appreciated. Thanks.
 
The easiest method is to map a drive on the server to use it as if it were a
local resource. If this is not possible, you can pull the file from a UNC
path using a StreamReader and write the bytes directly to the HTTP stream.
Either way, the response has to be set to the proper MIME type for the file
so the user can download it (NOTE that some client settings will still cause
the file to be "opened" rather than downloaded).

---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
thanks for the reply. interesting. Is this how sites like windows update
handle this? That site certianly needs to download files and take actions on
them...

thanks again.
 
Back
Top