S
Steve E.
Hi,
My application displays a list of files for download. The files themselves
are kept out of web scope, as this is a password-protected application and
only some folks are allowed access to the files. The problem is that, with
large files (say 150MB), the download will fail, giving a "Server is busy"
message to the browser, and in the server application log noting that
"aspnet_wp.exe stopped unexpectedly." My research determined that, once IIS
hit a memory limit as defined in machine.config Process Model section, it
recycles aspnet_wp.exe.
How can I modify the code below so it won't be so memory-intensive when
downloading large files? Platform is VStudio2003, Framework 1.1 Win2K
Server; IIS5.
Big thanks in advance,
Steve E.
-------start code-----------
Dim sFilePath As string = "c:\somedir\largeFile.zip"
Dim sSaveAsName As string = "largeFile.zip"
Dim sMimeType As string = "application/zip"
Dim xFile As System.IO.FileInfo = New System.IO.FileInfo(sFilePath)
With Response
.Clear()
.ContentType = sMimeType
.AddHeader("content-disposition", "attachment;filename=" & sSaveAsName)
.WriteFile(xFile.FullName)
.End()
End With
------end code------------
My application displays a list of files for download. The files themselves
are kept out of web scope, as this is a password-protected application and
only some folks are allowed access to the files. The problem is that, with
large files (say 150MB), the download will fail, giving a "Server is busy"
message to the browser, and in the server application log noting that
"aspnet_wp.exe stopped unexpectedly." My research determined that, once IIS
hit a memory limit as defined in machine.config Process Model section, it
recycles aspnet_wp.exe.
How can I modify the code below so it won't be so memory-intensive when
downloading large files? Platform is VStudio2003, Framework 1.1 Win2K
Server; IIS5.
Big thanks in advance,
Steve E.
-------start code-----------
Dim sFilePath As string = "c:\somedir\largeFile.zip"
Dim sSaveAsName As string = "largeFile.zip"
Dim sMimeType As string = "application/zip"
Dim xFile As System.IO.FileInfo = New System.IO.FileInfo(sFilePath)
With Response
.Clear()
.ContentType = sMimeType
.AddHeader("content-disposition", "attachment;filename=" & sSaveAsName)
.WriteFile(xFile.FullName)
.End()
End With
------end code------------