File Download Problem

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top