Showing The Download Dialog Box?

H

Husam

Hi EveryBody:

I was downloading a lot of file by using the following code:

Response.AddHeader("Content-Disposition", "attachment; filename=" + filename)
response.BinaryWrite(buffer() as byte)

but I discover for large data this will be a problem because every time I
tried to download large data I error raise toled me that system out of memory.

I tried another way to upload and download to web server that really worked
with me very well but I face a problem when I download any file and I did not
use the response for writing it that the Download dialog box dose not appear
so some body can help me and toled me how can I use
My.Computer.Network.DownloadFile
or WebClinte class download method and still can show the download dialog
box I
tried
Response.addheader(value as string,name as string) but did not work.

any help will be appreciated

reagard's

Husam
 
G

Guest

Hi EveryBody:

I was downloading a lot of file by using the following code:

 Response.AddHeader("Content-Disposition", "attachment; filename=" + filename)
 response.BinaryWrite(buffer() as byte)

 but I discover for large data this will be a problem because every time I
tried to download large data I error raise toled me that system out of memory.

I tried another way to upload and download to web server that really worked
with me very well but I face a problem when I download any file and I did not
use the response for writing it that the Download dialog box dose not appear
so some body can help me and toled me how can I use
My.Computer.Network.DownloadFile
or WebClinte class download method and still can show the download dialog
box I
tried
Response.addheader(value as string,name as string) but did not work.

any help will be appreciated

reagard's

Husam

What .NET version do you use?

There is a fix for 1.0-1.1, see http://support.microsoft.com/kb/823409
 
F

Fred

Dans : Husam disait :
Hi EveryBody:

I was downloading a lot of file by using the following code:

Response.AddHeader("Content-Disposition", "attachment; filename=" +
filename) response.BinaryWrite(buffer() as byte)

but I discover for large data this will be a problem because every
time I tried to download large data I error raise toled me that
system out of memory.

Another idea :
The default max length (with .NET 2.0) is 4Mb.
Did you check this ?
Add this element to your your web.config if not.
<httpRuntime maxRequestLength = "..." />

PS : I use Me.Response.TransmitFile
 
F

Fred

Dans : Fred disait :
Dans : Husam disait :

Another idea :
The default max length (with .NET 2.0) is 4Mb.
Did you check this ?
Add this element to your your web.config if not.
<httpRuntime maxRequestLength = "..." />

PS : I use Me.Response.TransmitFile

Sorry, This is for upload ...
 
Joined
Oct 7, 2009
Messages
1
Reaction score
0
I had a problem, when I was debbugging my application the dialog box always appears, but when I moved it to my server, It doesn't work.

I discovered that in Tools >> Internet Options >> Security >> Personalized Level >> Donwloads >> The fisrt Option ...

In portuguese: "Aviso automático para downloads de arquivo" may be check in ON (or Habilitar in portuguese). In English, probaly "Automatized File Download".

It's work for me! ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top