rgvn
asked on
IIS 6.0 HTTP Compression Problem
Hi
I have one ASP page (ExcelReport.asp) with Response.ContentType = "application/vnd.ms-excel" and Response.AddHeader "Content-Disposition", "filename=ExcelReport.xls" to export to excel. The website is hosted on Win 2003 server win IIS 6.0.When the user opens this page it displays the filedownload dialog box with file name "ExcelReport.xls" and user can save it as an excel file.
The problem is when the HTTP Compression for dynamic files (compress application files) is turned on, on IIS, the files name extension (.xls) is not coming while trying to download. It comes as ExcelReport.asp and on saving gets saved as .asp.
This issue happens with IE 5.5 (SP2). But works fine if the HTTP Compression for dynamic files is turned off. Is this an IIS issue with HTTP Compression?
Can any one help on this ?
Thanks in advance
RAG
I have one ASP page (ExcelReport.asp) with Response.ContentType = "application/vnd.ms-excel"
The problem is when the HTTP Compression for dynamic files (compress application files) is turned on, on IIS, the files name extension (.xls) is not coming while trying to download. It comes as ExcelReport.asp and on saving gets saved as .asp.
This issue happens with IE 5.5 (SP2). But works fine if the HTTP Compression for dynamic files is turned off. Is this an IIS issue with HTTP Compression?
Can any one help on this ?
Thanks in advance
RAG
ASKER
Hi
Thank you very much for your reply.
We already have the same link and followed the same when we setup the HTTP Compression on IIS. And we also have .xls extension added in the Metabase.xml as given below.
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compre ssion/gzip "
HcCompressionDll="%windir% \system32\ inetsrv\gz ip.dll"
HcCreateFlags="1"
HcDoDynamicCompression="TR UE"
HcDoOnDemandCompression="T RUE"
HcDoStaticCompression="TRU E"
HcDynamicCompressionLevel= "0"
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="as p
dll
exe
xls"
>
</IIsCompressionScheme>
Also we have the web service extension added for the HTTP Compression.
Could you please correct, if there is something wrong in the metabse.xml ?
Thanks
RAG
Thank you very much for your reply.
We already have the same link and followed the same when we setup the HTTP Compression on IIS. And we also have .xls extension added in the Metabase.xml as given below.
<IIsCompressionScheme Location ="/LM/W3SVC/Filters/Compre
HcCompressionDll="%windir%
HcCreateFlags="1"
HcDoDynamicCompression="TR
HcDoOnDemandCompression="T
HcDoStaticCompression="TRU
HcDynamicCompressionLevel=
HcFileExtensions="htm
html
txt"
HcOnDemandCompLevel="10"
HcPriority="1"
HcScriptFileExtensions="as
dll
exe
xls"
>
</IIsCompressionScheme>
Also we have the web service extension added for the HTTP Compression.
Could you please correct, if there is something wrong in the metabse.xml ?
Thanks
RAG
No, nothing wrong in the metabase.xml. We tested it out here and it looks like when compression is enabled it ignores the filename of the Content Type that is declared and automatically returns the document as the name of the called page.
ASKER
Hi
Thank you very much for your confirmation on metabase.xml. So we can consider this as a problem with HTTP Compression (IIS 6.0).
Is there any solution for this ? Is it documented somewhere by microsoft ?
Thanks
RAG
Thank you very much for your confirmation on metabase.xml. So we can consider this as a problem with HTTP Compression (IIS 6.0).
Is there any solution for this ? Is it documented somewhere by microsoft ?
Thanks
RAG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you using SSL by chance? Not sure if it is related, but I have seen in IE where the file name used for downloads is different based on using SSL or non-SSL. I know that it is IE and not the web servers, because we have SSL offload engines and so the web servers don't even know that SSL is invloved.
Not using SSL.
If you haven't done this already, you may want to get a packet capture utility and caputer the data stream. One with compression and one with out and see what the difference is between the two.
One other thing you may want to try is to change the order of the file extentions. Try:
HcScriptFileExtensions="xl s
asp
dll
exe"
and then:
HcScriptFileExtensions="dl l
xls
asp
exe"
Could be that IIS is replacing the file extentions with whatever is first in the list. Which of course would need to be fixed by MS.
One other thing you may want to try is to change the order of the file extentions. Try:
HcScriptFileExtensions="xl
asp
dll
exe"
and then:
HcScriptFileExtensions="dl
xls
asp
exe"
Could be that IIS is replacing the file extentions with whatever is first in the list. Which of course would need to be fixed by MS.
ASKER
I tried the same, but again the same results.
Thanks
RAG
Thanks
RAG
Stupid question, why are you putting .xls in the HcScriptFileExtensions section? Should this be in the HcFileExtension section? In all of the examples for IIS 5.0 the only thing in HcScriptFileExtension are "executable" files, things like Excel, Word, PowerPoint documents are in the HcFileExtension.
Based on the following link xls should be in HcFileExtension, not HcScriptFileExtension because it is considered a static file and not a dynamic file:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/25d2170b-09c0-45fd-8da4-898cf9a7d568.mspx?mfr=true
ASKER
This was already tried by adding the .xls under HcFileExtension in the Metabase.xml. And gave the same results with IE 5.5 (SP2).
Thanks
RAG
Thanks
RAG
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
See the following article for an indepth description of HTTP Compression in IIS to set this up:
http://dotnetjunkies.com/Article/16267D49-4C6E-4063-AB12-853761D31E66.dcik