G
Guest
I've got two problems. First, when this code works, I get a "Open/Save/Cancel" dialog and if I click "Open", I get the same dialog again and then IE opens Excel. So what am I doing wrong to get the double dialog? Also, I occasionally get a "Server Application Unavailable" error message (as an HTML page) instead of the download. When I get the error, two log files are generated into my web server's "TEMP" directory, both of which contain
=== Verbose logging started: 3/26/2004 16:59:49 Build type: SHIP UNICODE 2.00.2600.1183 Calling process: E:\Program Files\Microsoft Office\Office10\EXCEL.EXE ==
MSI (c) (74:14): Resetting cached policy value
MSI (c) (74:14): Machine policy value 'Debug' is
MSI (c) (74:14): ******* RunEngine
******* Product: {90280409-6000-11D3-8CFE-0050048383C9
******* Action:
******* CommandLine: *********
MSI (c) (74:14): Client-side and UI is none or basic: Running entire install on the server
MSI (c) (74:14): Grabbed execution mutex
MSI (c) (74:14): Failed to connect to server. Error: 0x8007000
MSI (c) (74:14): Failed to connect to server
MSI (c) (74:14): MainEngineThread is returning 160
=== Verbose logging stopped: 3/26/2004 16:59:49 ==
In case I'm doing something wrong, the current code is
System.IO.FileInfo fi = new System.IO.FileInfo(sFileName)
String sFileLength = fi.Length.ToString()
Response.ClearHeaders()
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Response.AddHeader("Content-Disposition", "attachment;filename=" + sNameOnly)
Response.AddHeader("Content-Length", sFileLength)
Response.WriteFile(sFileName)
Thanks
Lowell
=== Verbose logging started: 3/26/2004 16:59:49 Build type: SHIP UNICODE 2.00.2600.1183 Calling process: E:\Program Files\Microsoft Office\Office10\EXCEL.EXE ==
MSI (c) (74:14): Resetting cached policy value
MSI (c) (74:14): Machine policy value 'Debug' is
MSI (c) (74:14): ******* RunEngine
******* Product: {90280409-6000-11D3-8CFE-0050048383C9
******* Action:
******* CommandLine: *********
MSI (c) (74:14): Client-side and UI is none or basic: Running entire install on the server
MSI (c) (74:14): Grabbed execution mutex
MSI (c) (74:14): Failed to connect to server. Error: 0x8007000
MSI (c) (74:14): Failed to connect to server
MSI (c) (74:14): MainEngineThread is returning 160
=== Verbose logging stopped: 3/26/2004 16:59:49 ==
In case I'm doing something wrong, the current code is
System.IO.FileInfo fi = new System.IO.FileInfo(sFileName)
String sFileLength = fi.Length.ToString()
Response.ClearHeaders()
Response.Clear()
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
Response.AddHeader("Content-Disposition", "attachment;filename=" + sNameOnly)
Response.AddHeader("Content-Length", sFileLength)
Response.WriteFile(sFileName)
Thanks
Lowell