473,472 Members | 2,140 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

downloaded file is missing

ntm
I am using the following ASPC.VB code to download a text file:

Response.Clear()
Response.ContentType = "ignore/this" ' arbitrary
Response.AddHeader("Content-Disposition",
"attachment;filename=file.txt")
Response.WriteFile(tempFileName)
Response.Flush()
Response.End()

I get the open/save/cancel dialog box on the Browser side. If I
select save, I see a brief download window and the the Save As dialog
box appears and I can save the file successfully. But if I select
open, I get the brief download window and then Notebook launches but a
Notebook error appears with the message:

"Cannot find the C:\Documents and Settings\Nick\Local
Settings\Temporary Internet Files\Content.IE5\03RJISDH\file[1].txt
file."

It's as if the file was downloaded but deleted before it could be
opened by Notebook.

I'd appreciate any help you can offer.

Nick
Nov 18 '05 #1
2 1309
Strange. This works for me. Was it buffering?

Private Sub Button1_Click _
(ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles Button1.Click
Dim tempFileName As String
tempFileName = Server.MapPath("file.txt")
Response.Buffer = True
Response.Clear()
Response.ContentType = "ignore/this" ' arbitrary
Response.AddHeader("Content-Disposition", _
"attachment;filename=file.txt")
Response.WriteFile(tempFileName)
Response.Flush()
Response.End()
End Sub

"ntm" <nt***@mail.com> wrote in message
news:30*************************@posting.google.co m...
I am using the following ASPC.VB code to download a text file:

Response.Clear()
Response.ContentType = "ignore/this" ' arbitrary
Response.AddHeader("Content-Disposition",
"attachment;filename=file.txt")
Response.WriteFile(tempFileName)
Response.Flush()
Response.End()

I get the open/save/cancel dialog box on the Browser side. If I
select save, I see a brief download window and the the Save As dialog
box appears and I can save the file successfully. But if I select
open, I get the brief download window and then Notebook launches but a
Notebook error appears with the message:

"Cannot find the C:\Documents and Settings\Nick\Local
Settings\Temporary Internet Files\Content.IE5\03RJISDH\file[1].txt
file."

It's as if the file was downloaded but deleted before it could be
opened by Notebook.

I'd appreciate any help you can offer.

Nick


Nov 18 '05 #2
ntm
"Ken Cox [Microsoft MVP]" <BA************@sympatico.ca> wrote in message news:<#p**************@TK2MSFTNGP11.phx.gbl>...
Strange. This works for me. Was it buffering?


Ken,

Thanks very much for trying this yourself - I appreciate the effort.

I eventually tried a reboot which solved the problem, but left me
feeling very unsatisfied about what was happening. I guess I should
have tried the reboot before posting but I've gotten away from that
old habit with the more recent versions of Windows (lesson learned).

I'll see if the problem crops up again.

And again, thanks.

Nick
Nov 18 '05 #3

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

Similar topics

4
by: Joshua | last post by:
Is there a way to set up Apache to invoke a PHP equest when a file (a image for example) is downloaded? Say, then, that http://www.foo.com/downloads/app1.zip is downloaded, Id like to have...
0
by: Chad | last post by:
I have COM component embedded on html page. It has version 1.0.0.1 (by default). I have converted it in cab file. Code of html is something like: <HTML><HEAD></HEAD><BODY><OBJECT...
1
by: Ruskin | last post by:
I have a wee issue, where I have two different web sites; http://dev/home.htm http://live/home.htm On both sites, there is a custom OCX file being used. However, it may be a different version...
0
by: ProJee | last post by:
Hi, Response.WriteFile (or Response.OutputStream.Write) finishes immediately, not after the file is completely downloaded. It finishes before (!) the user clicks the "Save" or "Open" browser...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm streaming down to the client is saved...
2
by: comp.lang.php | last post by:
class ReportGenerator { function ReportGenerator() {} /** * Generate the HTTP headers necessary for this file type. Can be called statically *
3
by: Bouffa | last post by:
Hello everyone, I suppose you all know force-download scripts. The problem is that these scripts don't allow files to be splitted when downloading them via a download manager. I've found a...
1
by: suresh_nsnguys | last post by:
Hi, I will allow users to download one zip file(contain HTML file and 1 image directory with -gif,jpeg files) to his local hard disk. HTML file contain source code to display images ...
0
by: kumarraman | last post by:
I am using vb.net 2003 ,to develop the programe to download the emails from outlook. its working properly. but i have one problem, whenn the start event run. i donot know when will all the email will...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.