Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Http 500 error
Message
 
To
12/02/2010 16:33:57
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Internet
Category:
Active Server Page
Title:
Miscellaneous
Thread ID:
01448992
Message ID:
01448993
Views:
25
>I have a web app that creates an excel XLS file dynamically and places the file in a virtual directory called /download/ on a Win2003 Server with IIS.
>
>I then dynamically create a .ASP file with the below script and place it in the /download/ folder. My goal is to have the Save As dialog ask the user where they want to save the Excel file. This works 99% of the time in production and 100% of the time on my development PC.
>
>The problem is there is 1 excel file that is created that is by far the largest file at 4meg. When the routine runs the XLS file is created and the below ASP file is created but the browser returns a "HTTP 500 Internal Server Error".
>
>Why would the error occur for this one XLS file? Is there a size setting in IIS that I can adjust, assuming it's a file size limitation? If I reduce the file size of this XLS file to under 4meg, the below works fine.
>
>Any solutions?
>
>Thanks,
>
>Jerry
>
>
>
>
>
>    Response.ContentType = "application/x-unknown" ' arbitrary 
>    fn = "myexcelfile.xls" 
>    FPath = "C:\mywebsite\download\" & fn 
>    Response.AddHeader "Content-Disposition","attachment; filename=" & fn 
> 
>    Set adoStream = CreateObject("ADODB.Stream") 
>    adoStream.Open() 
>    adoStream.Type = 1 
>    adoStream.LoadFromFile(FPath) 
>    Response.BinaryWrite adoStream.Read() 
>    adoStream.Close 
>    Set adoStream = Nothing 
> 
>    Response.End 
>
>
Just a wild guess here, but 4GB is 32bit limitation.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform