1

Resolved

webresource.axd not compressing properly

description

Hi there,
 
Ever since I changed to changeset 22589 and above 22680 I noticed that something isn't quite right with mbcompression in particular the following
 
1) In the web.config JavaScriptCompressionHandler and CssCompressionHandler aren't available I get them in red, although I can still compile
<add verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler, MbCompression" validate="false"/>
<add verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler, MbCompression" validate="false"/>
 
Also I noticed that webresource.axd was not getting compressed on certain servers, I also noticed some of my javascript such as Page_Validate() which happens to be in webresource.axd showed that it was not available
 
Changeset 21470 everything works exactly as required, can you please let me know what has changed, I've attached a file to show you the output I'm getting with the latest version
 
Regards Rob

file attachments

comments

Miron wrote Mar 31, 2009 at 4:35 PM

Can you send me error messages or any piece of code that I can try to debug the problem?

robsworld2006 wrote Apr 1, 2009 at 1:11 AM

I've attached a demo application that you can use to debug I'm using Vista IIS7 for my testing and the problem also exists on IIS6

The webpage also details the following instructions:

Intro:

Ok I've set up this dummy webpage page, it contains a textbox with a required validator. There is also a core.js that should call Page_ClientValidate() function
Problem:

Changeset 22680 (Latest) doesn't like to compress the webresource.axd file. If you use this same page with Changeset 21470 everything works as expected
  1. As the page stands now you will notice that webresource.axd doesn't compress (use 'Web Developer Toolbar' in firefox), notice that my Page_ClientValidate() didn't fire, also if I try to navigate to webresource.axd?d=242....... I get the following error:
    ERROR
    [NullReferenceException: Object reference not set to an instance of an object.]
    Miron.Web.MbCompression.Util.DecryptString(String input) +102
    Miron.Web.MbCompression.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +100

    [HttpException (0x80004005): This is an invalid webresource request.]
    Miron.Web.MbCompression.WebResourceCompressionModule.ThrowHttpException(Int32 num, String SRName, Exception innerException) +52
    Miron.Web.MbCompression.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +147
    Miron.Web.MbCompression.WebResourceCompressionModule.OnPreRequestHandlerExecute(Object sender, EventArgs e) +193
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
  2. If I edit the required validator to set EnableClientScript="true" then the webresource.axd file compresses and Page_ClientValidate() fires
Please let me know if there is anything else you need

Regards DotnetShadow

wrote Apr 1, 2009 at 1:11 AM

robsworld2006 wrote Apr 1, 2009 at 1:12 AM

Sorry the description stuff should be:

Intro:

Ok I've set up this dummy webpage page, it contains a textbox with a required validator. There is also a core.js that should call Page_ClientValidate() function
Problem:

Changeset 22680 (Latest) doesn't like to compress the webresource.axd file. If you use this same page with Changeset 21470 everything works as expected
  1. As the page stands now you will notice that webresource.axd doesn't compress (use 'Web Developer Toolbar' in firefox), notice that my Page_ClientValidate() didn't fire, also if I try to navigate to webresource.axd?d=242....... I get the following error:
    ERROR
    [NullReferenceException: Object reference not set to an instance of an object.]
    Miron.Web.MbCompression.Util.DecryptString(String input) +102
    Miron.Web.MbCompression.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +100

    [HttpException (0x80004005): This is an invalid webresource request.]
    Miron.Web.MbCompression.WebResourceCompressionModule.ThrowHttpException(Int32 num, String SRName, Exception innerException) +52
    Miron.Web.MbCompression.WebResourceCompressionModule.GetDataFromQuery(NameValueCollection queryString) +147
    Miron.Web.MbCompression.WebResourceCompressionModule.OnPreRequestHandlerExecute(Object sender, EventArgs e) +193
    System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +68
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
  2. I've added 2 folders Good Mbcompression (Changeset 21470) and Latest MbCompression (Changeset 22680). Basically I copy the relevant dll to the bin then shift reload in the browser and you can test both of them

robsworld2006 wrote Apr 1, 2009 at 11:53 AM

Hi there I just downloaded changeset 22774 and webresource.axd seems to be functioning correctly again.

The problem in web.config file still exists, though it could be a resharper problem but not sure at this stage

Thanks for all your help so far.

wrote Apr 1, 2009 at 7:54 PM

wrote Feb 14, 2013 at 2:04 AM

wrote May 16, 2013 at 6:52 AM

wrote May 16, 2013 at 6:52 AM

wrote Jun 14, 2013 at 6:43 AM