473,395 Members | 1,558 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,395 software developers and data experts.

Download Large File

I am using the following code to allow the ability to open a large text file on our web server

Response.ContentType = "application/x-msdownload"
Response.AppendHeader("content-disposition", "attachment; filename=reportenginelog.txt")
string FilePath = @"c:\tqis\logs\reportenginelog.txt";
Response.WriteFile(FilePath)
Response.End()

The problem I am running into is that there is a windows service running on the web server that updates the file. when I execute the code above I get a "file in use" error. Is there a better way to accomplish this task that will get me past this problem ?
If I log onto the server I can open the file in notepad even when the windows service is running

Nov 18 '05 #1
2 1228
"=?Utf-8?B?Slppbms=?=" <an*******@discussions.microsoft.com> wrote in
news:09**********************************@microsof t.com:
Is there a better way to accomplish this task that will get me past
this problem ?


How about opening the file with a FileStream (in read mode)... read it into
an array, and write the file back out?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2
Do you have any sample code ?
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Thomas Andersson | last post by:
Hi, I am trying to find a working solution for download of large files (400-800 MB)... But this seems almost impossible to find a working example. I have tried Response.Transmitfile, this...
1
by: Al Cadalzo | last post by:
I have a web page that allows a user to download data by clicking on a link button. I then use Aspose.Excel (v1.0.3705) to generate the file for download and then I call the "Save" method on the...
0
by: hoenes1 | last post by:
Hi all, I'm trying to send files to a client following the instructions of http://support.microsoft.com/?id=812406 Everything works fine, but if files are large and/or if the bandwidth is...
6
by: Jatin | last post by:
Hey Guys I have a web application that allows users to download files. But the files are not hosted on the webserver. The files are stored on external servers and are referenced by a URL/URI....
13
by: ron1972 | last post by:
Hi I have a large pdf file that if I create an anchor link to, the browser will try to open the file, which takes quite a long time. Is there a way to force the browser to download the file rather...
2
by: jwf | last post by:
I am developming a web application in ASP.NET (VB) and am looking to develop functionality where a user clicks on a link to download a file but at no point can the user see the actual URL link to...
2
by: Dan D | last post by:
I have a large install file (an exe) on my web server that people download and install from. Looking at my log files, I see a lot of people downloading it, but no way to tell for sure if they...
3
by: Gargoyle | last post by:
I am curious to know if any research has been conducted regarding the efficiency of having a single (large) .js file downloaded for a webpage compared to several smaller .js files. For example...
1
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I have the following code to download the data from my web application: the code is: Dim rawan As New List(Of String) ' for File Name Dim rawan1 As New List(Of Byte()) ' for...
5
by: empiresolutions | last post by:
I have some scripts that when initiated by a link click will FTP a 1G+ file from a secure server to another server using ftp_get(). Once ftp_get() is complete i then user Content Headers to open a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.