2 September 2010 @ 14:43

I've been investigating this problem for a couple of days and hope that this post would save others some grief. Here's the situation: 2 web servers, same configuration (at least that's what it seemed), and on one server I can successfully export data to a downloadable CSV file but on the other server the CSV export downloads as an ASPX page instead of the CSV file. Seems strange when all configurations on the server is supposedly the same. After several unsuccessful comparisons of configuration settings ...etc I've gone down to the level of analyzing the HTTP traffic from/to both servers and comparing the differences and that's when one difference became apparent. On one server I can see that the HTTP traffic has been compressed and on the other that wasn't the case. Strange ...eh. For both sites the settings below were the same, which lead me think that probably the command line HTTP Compression settings were not configured correctly on one of the servers. So after reconfiguring compression on both servers the issue of exporting the CSV file was now occurring on both servers.

IIS6Compression

So the only possible way to resolve this problem was by disabling compression and given this was not desirable at a global site level the only other option left was to turn off compression for a specific folder. As a result I've moved the CSV export ASPX page into its own folder and disabled compression there and there you go that was the solution!!

To find out more about enabling HTTP Compression check the Enabling HTTP Compression (IIS 6.0) page.

At the bottom of the page there's the reference below on enabling compression on a directory specific basis.

adsutil set w3svc/1/root/Home/StyleSheets/DoStaticCompression false

The number 1 shown above represents you're site ID, for the default website the value is one, for other sites the value will be different. To obtain the Site ID of your site in IIS6 follow Chris Crowe's blog post IIS Website Identifiers which provides detailed info on how to obtain your Site ID.

Hope this helps.

About Me

I'm a Software Consultant & Developer living in Melbourne, Australia.

I graduated in 2005 from the University of Canterbury in Chirstchurch, New Zealand, where I studied a B.Com. in Information Systems & Computer Science.

Since graduating in 2005 I've worked on teams and projects of various sizes and using different technologies. These include Cost Control applications for the construction industry, CMS solutions tailored for online publishing and digital media as well as larger scale projects such as Internet Banking systems.

I'm a Microsoft Certified Application Developer and am a person who's very passionate about web technologies & software particularly in the Microsoft domain. I'm always eager to learn about new software/tools and practices and frequently attend conferences and user group events to learn about the latest and greatest.

In addition to being very passionate about technology, I'm a tech savvy person with deep interest in business. I enjoy blogging and I previously ran the Christchurch, NZ .NET user group. You can read more about me on the About page. You can also grab my CV here

mcp

mcp

View Daniel Wissa's profile on LinkedIn

Calendar

<<  May 2012  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar

Recent Comments

Comment RSS

Month List