I have created quite a few customized pages (e.g. http://www.kerrywong.com/cmsg ) on my blog site. One thing I noticed is that some of the .Net generated client side java scripts (e.g. WebForm_AutoFocus and some client side validations) do not fire correctly when running under framework 2.0. At first I thought that this was due to some build problems or some incorrect configuration settings in machine.config. But when I deployed the same webpages to a new website (say on a different port), all the client side java scripts worked fine. And if I load the same page deployed on the same site where dasBlog is deployed with IE, I got a scripting error which complains WebForm_AutoFocus is not defined. So I knew that something is wrong with the web.config that came with dasBlog.

After some searching, I found out that the problem was caused by certain settings in web.config. In .Net 2.0 client side scripts are dynamically generated via WebResource.axd, and for whatever reason, certain settings prevent the generated client side java scripts to execute. Ross Hawkins has a great article on this issue In his blog, he examined many different scenarios which might lead to the behavior I discussed above. For dasBlog users, the key is to find this line in your dasBlog web.config file (located in <blowery.web> section):

<httpCompress preferredAlgorithm="gzip" compressionLevel="high">

And change the compression level to "none". This approach is not ideal though since by removing the compression capability the website performance may suffer a little bit, depending on the request size and the website traffic. But right now, it seems that this is the only way that I can find to solve this problem. I will certainly investigate more and will keep everyone posted if I find a better solution.

Be Sociable, Share!