472,960 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,960 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 2194
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...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.