By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,335 Members | 2,718 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,335 IT Pros & Developers. It's quick & easy.

file copy operation

P: n/a
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.
Nov 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!
***************************

"djc" wrote:
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.

Nov 19 '05 #2

P: n/a
djc
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.

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:9C**********************************@microsof t.com...
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!
***************************

"djc" wrote:
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.

Nov 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.