CodeKicks.com
Focus on Microsoft Technologies - Tutorials, Articles, Code Samples.

Thursday, September 14, 2006

ASP.NET 2.0: Http Compression and WebResource.axd

Another interesting issue in ASP.NET 2.0. If you use Http Compression module such as blowery, please note that in ASP.NET 2.0 this may cause an issue so all your client script validations and postbacks will stop working. You get various javascript errors like 'WebForm_PostBackOptions' is undefined. It took me several hours to figure out (hope this post will save hundreds of thousands of developers hours world wide).


In ASP.NET 2.0 all validation scripts are processed via server-side WebResource.axd handler while in ASP.NET 1.1 you can find them in aspnet_client folder. Http compression prevents WebResource.axd client side scripts to render normally (or at all ...). Excluding the path=WebResource.axd from the compression configuration solves the problem.

Post a Comment

CodeCruiser said...

It would have been useful if you also told where to disable it.