[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

IIS 6.0 HTTP Compression Problem

Posted on 2006-04-27
15
Medium Priority
?
643 Views
Last Modified: 2008-01-09
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
0
Comment
Question by:rgvn
  • 5
  • 4
  • 4
13 Comments
 
LVL 2

Expert Comment

by:disentropy
ID: 16561672
The IIS engine is most likely attempting to compress the file, but because you have no associated file compression in the metabase that is creating a "zipped" (or similarly compressed) file, it is returning the page as the name of the asp file (which is the default behavior). It's not an issue with compression in IIS; the file should be delivered using the file compression (and associated file extesion) you identify to IIS in the metabase to use as the compression.

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
0
 

Author Comment

by:rgvn
ID: 16561817
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/Compression/gzip"
            HcCompressionDll="%windir%\system32\inetsrv\gzip.dll"
            HcCreateFlags="1"
            HcDoDynamicCompression="TRUE"
            HcDoOnDemandCompression="TRUE"
            HcDoStaticCompression="TRUE"
            HcDynamicCompressionLevel="0"
            HcFileExtensions="htm
                  html
                  txt"
            HcOnDemandCompLevel="10"
            HcPriority="1"
            HcScriptFileExtensions="asp
                  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
0
 
LVL 2

Expert Comment

by:disentropy
ID: 16562009
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.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:rgvn
ID: 16562090
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
0
 
LVL 2

Accepted Solution

by:
disentropy earned 252 total points
ID: 16562142
The only workaround I can think of is to have your ASP page create the excel file to a location on you website and then redirect to the actual excel file, but then you would have to clean up that directory often.

I couldn't find any documentation on the MS or MSDN site, so it must be a problem with the implementation.

I recommend notifying MS about the problem.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16562851
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.
0
 
LVL 2

Expert Comment

by:disentropy
ID: 16562931
Not using SSL.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16563015
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="xls
              asp
               dll
               exe"

and then:

HcScriptFileExtensions="dll
             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.
0
 

Author Comment

by:rgvn
ID: 16584107
I tried the same, but again the same results.

Thanks
RAG
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16592490
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.
0
 
LVL 57

Expert Comment

by:giltjr
ID: 16592505
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
0
 

Author Comment

by:rgvn
ID: 16593170
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
0
 
LVL 57

Assisted Solution

by:giltjr
giltjr earned 248 total points
ID: 16599953
I would then follow disentropy's advice and report to MS.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question