473,403 Members | 2,293 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,403 software developers and data experts.

Response.TransmitFile and Action Canceled page


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?

thank you!

the conde is in the Page_Load sub:

Response.Clear()
Response.AddHeader("Content-Length",
DownloadFile.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment;
filename=" & FileName)
Response.TransmitFile(DownloadFile.FullName)

Response.Flush()
Response.Close()
Mar 23 '06 #1
2 6556
either the user hit stop, which you can do nothing about, or you page timed
out becuase the download took too long. up the scripttimeout for the page.

note: asp.net will max out at about 50 concurrent downloads, so you do not
want then to take too long.

-- bruce (sqlwork.com)
"mgalvez" <mg*****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...

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?

thank you!

the conde is in the Page_Load sub:

Response.Clear()
Response.AddHeader("Content-Length",
DownloadFile.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment;
filename=" & FileName)
Response.TransmitFile(DownloadFile.FullName)

Response.Flush()
Response.Close()

Mar 23 '06 #2
Bruce,

All users were getting the same behavior even with small files…

Now, I commented out this code:
‘ Response.Flush()
‘ Response.Close()
Then, build and publish the site
Then, tested and: Sometimes the page was getting closed and sometimes not.
Also, every other time, the file was displayed between the html of the home
page!

Then, I removed the comments
Response.Flush()
Response.Close()

Then, build and publish the site again

Now everything works fine! The page gets closed automatically

Is there a bug in IIS or .NET 2005?

Thanks for your help


"Bruce Barker" wrote:
either the user hit stop, which you can do nothing about, or you page timed
out becuase the download took too long. up the scripttimeout for the page.

note: asp.net will max out at about 50 concurrent downloads, so you do not
want then to take too long.

-- bruce (sqlwork.com)
"mgalvez" <mg*****@discussions.microsoft.com> wrote in message
news:B3**********************************@microsof t.com...

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?

thank you!

the conde is in the Page_Load sub:

Response.Clear()
Response.AddHeader("Content-Length",
DownloadFile.Length.ToString())
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Disposition", "attachment;
filename=" & FileName)
Response.TransmitFile(DownloadFile.FullName)

Response.Flush()
Response.Close()


Mar 23 '06 #3

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

Similar topics

1
by: Dumitru Ozunu | last post by:
Hello, I have a strange problem, I've browsed the whole newsgropu but I found no answer :-( I have a web page that contains a submit button (asp .net) when submited, it makes a redirect to a...
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...
1
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...
0
by: Thomas Andersson | last post by:
Hi, I have a problem with Response.TransmitFile. The server reset the connection after approx. 20 minutes and sometimes after 7-8 minutes when i try to download large files (400MB +) with...
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...
4
by: Eirik Eldorsen | last post by:
Is it possible to clear the generated html ouput on aspx page, and then write something else? Why? :-) I want to only the html code from a panel, and most important no form tags. Why? I'm...
3
by: e name | last post by:
Hello, I am getting "Action Cancelled" message on an asp page which is running a process that takes more then 25 minutes. I have "Friendly error message" turned off on browser setting. And what...
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: 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...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.