473,320 Members | 2,146 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

file copy operation

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
2 1095
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Paul | last post by:
Dear All, I want to use web form to upload my file and copy the file to another machine. I can upload the file, but when I copy the file(file.CopyTo(".....", true)) to another machine(map...
9
by: Vai2000 | last post by:
Hi All, Here's a situation, I am trying to process some large Files via a Win Svc using FileMonitor. During the test process I tried copy and pasting a file in a folder and got an error saying...
11
by: Stephan Steiner | last post by:
Hi Generally, FileInfo fi = new FileInfo(path); long size = fi.Length; gets you the length of a file in bytes. However, when copying files, even while the copy operation is still in...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
8
by: Dinesh Jain | last post by:
Hi all, I encountered a serious problem while working with clipboard class in VB.NET. I want to simulate cut-copy-paste operation with my application and Windows Explorer. User can copy files...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.