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
 
A

Alexey Smirnov

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 timeI
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 ...
 

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

Top