File Download Problem

G

Guest

I have developed a web based file manager application. It has a simple
interface that allows users to upload and download files. Everything works
great except for one new download problem. I am forcing the file download in
the following code:

Response.Clear()
Response.ContentType = "application/octet-stream"
Response.AppendHeader("Content-Length", myFile.Length.ToString())
Response.AppendHeader("content-disposition", "attachment; filename="
+ System.IO.Path.GetFileName(PhysFilePath))
Response.WriteFile(PhysFilePath)
Response.End()

The problem occurs when the file size gets to be over 64 MB. If the file
size is under 64 MB, it works great and immediately prompts with the download
dialog. When the file is over 64 MB the page just hangs and nothing happens.
Does anyone know what might be causing this problem? Is it a code issue or
something with the server/iis (server is W2K3, IIS 6)?

Thanks,
Tim
 
G

Guest

Thank you for your response.

I am using IIS 6. I set the following under IIsWebService:

AspMaxRequestEntityAllowed="4294967295"
MaxRequestEntityAllowed="4294967295"

I then re-started IIS, but I am still having the same problem.

I'm really at a loss here. I believe it has to be a server setting, but I
can't find where. Any help here would be greatly appreciated!

Thanks,
Tim
 

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

Forum statistics

Threads
474,038
Messages
2,570,374
Members
47,020
Latest member
anuradha

Latest Threads

Top