This project is read-only.
1

Resolved

Problem with cssVersion and ScriptVersion insertion (and 2 other notes)

description

Hi there,
 
I just tried your recent build of mbcompression, I noticed that when using AutoMode the cssVersion is not being inserted properly
 
In my aspx master page I have this: <link type="text/css" href="resources/css/style.css" rel="stylesheet" />
 
The generated page returns: <link type="text/css" href="resources/css/css.axd?d=style.css" &v=2rel="stylesheet" /><title>
Notice how the &v= is outside of the href=""
 
web.config Settings
<CompressorSettings reflectionAlloweded="false"
                    compressCSS="true"
                    compressJavaScript="true"
                    compressPage="true"
                    compressWebResource="true"
                    minifyContent="true"
                    compressThirdParityScripts="true"
                    cachingStorage="OutputCache"
                    autoMode="true"
                    scriptsVersion="2"
                    cssVersion="2">
 

NOTE #1:

Also you might want to update your readme file for people using IIS7 I noticed that it's not just enough to add to httpHandlers and httpModule the following is what is applied in web.config
<!-- The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS. -->
<system.webServer>
    There is a httphandler and httpmodule section in this section
 

NOTE #2:

Lastly I noticed a comment in your forum that said:
"Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."
 
I was trying to use this code below and I found that this also caused the same error
http://msmvps.com/blogs/omar/archive/2008/08/01/loading-static-content-in-asp-net-pages-from-different-domain-for-faster-parallel-download.aspx
 
Regards DotnetShadow

comments

Miron wrote Aug 28, 2008 at 12:27 AM

Problem with cssVersion fixed.
I will update the Readme.txt file soon
About your NOTE #2, where did you see the comment you are talking about?
In what forum ?

robsworld2006 wrote Aug 28, 2008 at 12:17 PM

The comment was made here:
http://mironabramson.com/blog/post/2007/10/New--Shiny--WebResourceaxd-compression-Module.aspx

Search for username Dave

Dave

This is a great control!

When I enable: <add name="PageCompressionModule" type="Miron.Web.MbCompression.PageCompressionModule, MbCompression, Version=1.0.1.5"/>

I get:

"Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression."

@Dave,
I guess it something with the supported encoding header sent by your browser.
I'm this days working on that issue to improve it. Keep truck the changes in http://www.codeplex.com/MbCompression
What enviroment and browser are you using?

So I was thinking if you try the code I suggested above you will see you get the same error, I think it's got to do with which is being called first

Thanks for your time and effort great stuff

Miron wrote Aug 28, 2008 at 9:09 PM

The Content Encoding Error shouldn't happen any more, since the code parse the "Accept-encoding" header as described by section 14 of RFC2616.
(Need to get last code)

wrote Sep 7, 2008 at 3:23 PM

wrote Feb 14, 2013 at 3:04 AM

wrote May 16, 2013 at 7:52 AM

wrote May 16, 2013 at 7:52 AM

wrote Jun 14, 2013 at 7:43 AM