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

Response.TransmitFile fail in the middle for modem user?

Oct
I have implemented an ISAPI filter to authenticate user download based on SQL
data. It works great for all high speed users but it fail after 20-30 mins
download on modem (yes, 56k!) user. The error message on the client side is
"The connection with the server has been reset".

I have tried increasing Server.ScriptTimeout to 2 hours also Session timeout
to very long. I've set this on both the site property and explicitly run
time. It doesn't change a thing.

Here is some code

<httpHandlers>
<add verb="*" path="*.exe" type="MyHandler.NewHandler,httpHandler"/>
</httpHandlers>

Here is the code to send file to user

string strFileName =
context.Request.MapPath(context.Request.ServerVari ables["PATH_INFO"]);
FileInfo myFile = new FileInfo(strFileName);
objResponse.AddHeader("Content-Disposition","attachment; filename=" +
myFile.Name);
objResponse.ContentType = "application/octet-stream";
objResponse.TransmitFile(myFile.Name);
objResponse.End();

BTW, I have tried Response.BinaryWrite. It doesn't experience this problem
but it seems to have quite worse performance than Response.TransmitFile.

Nov 19 '05 #1
1 2216
Oct


"Oct@ESI" wrote:
I have implemented an ISAPI filter to authenticate user download based on SQL
data. It works great for all high speed users but it fail after 20-30 mins
download on modem (yes, 56k!) user. The error message on the client side is
"The connection with the server has been reset".

I have tried increasing Server.ScriptTimeout to 2 hours also Session timeout
to very long. I've set this on both the site property and explicitly run
time. It doesn't change a thing.

Here is some code

<httpHandlers>
<add verb="*" path="*.exe" type="MyHandler.NewHandler,httpHandler"/>
</httpHandlers>

Here is the code to send file to user

string strFileName =
context.Request.MapPath(context.Request.ServerVari ables["PATH_INFO"]);
FileInfo myFile = new FileInfo(strFileName);
objResponse.AddHeader("Content-Disposition","attachment; filename=" +
myFile.Name);
objResponse.ContentType = "application/octet-stream";
objResponse.TransmitFile(myFile.Name);
objResponse.End();

BTW, I have tried Response.BinaryWrite. It doesn't experience this problem
but it seems to have quite worse performance than Response.TransmitFile.

Nov 19 '05 #2

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

Similar topics

3
by: jeffpriz | last post by:
I'm have a situation where I need to put a download link/button on a page, where the file to be downloaded does not exist on our webservers .... So I'm using Response.WriteFile (i've also tried...
0
by: Oct | last post by:
I have implemented an ISAPI filter to authenticate user download based on SQL data. It works great for all high speed users but it fail after 20-30 mins download on modem (yes, 56k!) user. The...
1
by: Ryan Pedersen | last post by:
I have been trying to figure out how to transmit a file back to a user using the response.transmitfile or response.writefile method and just not having much success. I have a dell server running...
3
by: Buddy Ackerman | last post by:
I'm trying to write files directly to the client so that it forces the client to open the Save As dialog box rather than display the file. On some occasions the files are very large (100MB+). On...
2
by: mgalvez | last post by:
I'm developing an interface that sends a file to the client. it works but the client also gets an "Action canceled" page (IE) how can I remove this page? or display the application home page? ...
7
by: eventuranza | last post by:
For my application, there users can upload and download files to the a webserver. Straightforward enough. However, when they upload a PDF file then try to download it, the file seems to be...
2
by: EmeraldShield | last post by:
I am confused about this... I have an app that has worked for a long time in 1.1. I upgraded it to 2.0. Everything works on my local machine, including transmit file. When I deploy the site...
2
by: Michael D. Ober | last post by:
When I single step through the code below, it sends back the PDF file that is retrieved in the line fm.GetAccountPDF(...). When I run without single stepping, I get the master page for this page. ...
1
by: =?Utf-8?B?V29vZGdub21l?= | last post by:
Hi, I have use the following code to transmit a file back to the browser that worked fine on a HTC_TTyN device running windows mobile 5.0. The code executes in the onclick event of a mobilelist...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.