473,748 Members | 6,037 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response.Transm itFile 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.AddHea der("Content-Length",
DownloadFile.Le ngth.ToString() )
Response.Conten tType = "applicatio n/octet-stream"
Response.Append Header("Content-Disposition", "attachment ;
filename=" & FileName)
Response.Transm itFile(Download File.FullName)

Response.Flush( )
Response.Close( )
Mar 23 '06 #1
2 6576
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*****@discus sions.microsoft .com> wrote in message
news:B3******** *************** ***********@mic rosoft.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.AddHea der("Content-Length",
DownloadFile.Le ngth.ToString() )
Response.Conten tType = "applicatio n/octet-stream"
Response.Append Header("Content-Disposition", "attachment ;
filename=" & FileName)
Response.Transm itFile(Download File.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*****@discus sions.microsoft .com> wrote in message
news:B3******** *************** ***********@mic rosoft.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.AddHea der("Content-Length",
DownloadFile.Le ngth.ToString() )
Response.Conten tType = "applicatio n/octet-stream"
Response.Append Header("Content-Disposition", "attachment ;
filename=" & FileName)
Response.Transm itFile(Download File.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
1980
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 page containing a IFRAME. sometimes the IFRAME loads the page that it references without problems, sometimes I get a nasty error: "Action canceled. Page could not be loaded", but the page exists on my server and I can see it in my browser when I...
3
7537
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 Response.TransmitFile) to put the file into the response.. My trouble is with a Zip file.. The user gets propmpted to Open or Save etc.. If they clicks save, the file saves just fine.. no problem... If they click Open, their Zip program will open,...
1
2245
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 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...
0
1434
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 Response.TransmitFile. What can be the problem? I have tried to use httpRuntime executionTimeout="14400"
1
3914
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 windows 2003 web server edition fully patched. The files are physically on the same web server. The entire site is HTTPS... it has to be because it is a financial site. With SSL on I cannot get TransmitFile or WriteFile to work (all files are less...
4
2945
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 setting contenttype to application/rtf to generate a word file from the code, and in Word 2003 the form tag is not an invisible element. I've tried putting my code in Page_Unload but i'm not allowed to user
3
2258
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 happens is this process processes a huge xml file size of 4mb which is passed to the com object located on Application Server as xmlElement from asp page on Webserver. The process finishes successfully after 29 min but try to re run by itself
2
3189
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. I have actually saved the file returned by IE 7 as a text file and opened it in notepad, so I have confirmed that it is indeed the page master being returned. The code is in the code behind file for the aspx page and is called directly from a...
1
2868
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 control. Now on a similar device running window mobile 6.0 the file is not displayed - the link causes a post back succesfully and the code appears to execute - on the browser a bar is displayed breifely at the bottom of the window (although ist...
0
8830
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9372
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9324
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9247
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6796
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6074
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4606
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.