problem with using compression. please help

Nov 24, 2009 at 8:46 PM

Dear all.

I am using the right files and web.config in my asp.net 3.5 application on IIS6/7 and Abyss web server using IE8 and Firefox3.5

Your example works fine. in all servers and browsers...

But In the published version of my app i get the compressed dump of all the aspx files like........

�����?�蟻��k@����4����W���d��s���������w9�_ö{L�?/v���~������ ���������ܖ���-����م�^��s���_��o�}���+?~?��҇�>��}TݣA�s��#��]���g \O�?-?~�~p�V�N�������Fo1PL��~,��c������n�^����(������?�c��� �~�_����~ﯾ�?A��1���O� ����:���'���[�/��o����q����� 쟿>���_���^��G����w?P0`]4��}�1[��?���s�%��g�����~�����&���{�K���N�9=��f����~���{u�'�|&c��������g��7�(�h������F��|�y�_�{��?�Շ��?�w�8x��on?�������OoB��

 

please check my web.config for any errors etc..as below..

Thanks

<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<!--<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>-->
<!--<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>-->
</sectionGroup>
</sectionGroup>
</sectionGroup>
<sectionGroup name="Miron.web">
<section name="CompressorSettings" type="Miron.Web.MbCompression.SettingsConfigSection"/>
</sectionGroup>

</configSections>
<appSettings>
</appSettings>
<system.net>
<defaultProxy>
<proxy bypassonlocal="True" usesystemdefault="False"/>
</defaultProxy>
</system.net>
<connectionStrings/>
<system.web>
<httpRuntime shutdownTimeout="120"/>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies>
</compilation>
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
<authentication mode="Forms">
<forms name="MyAuth" timeout="10" protection="All" loginUrl="~/Default1.aspx" slidingExpiration="true"/>
</authentication>
<sessionState mode="InProc" cookieless="false" timeout="10"/>-->
<!--<authentication mode="Windows"/>-->
<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="120"/>
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
<customErrors mode="Off">
</customErrors>
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode="Never" enableViewStateMac="false">
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="DotNetAge" assembly="DNA.UI.JQuery" namespace="DNA.UI.JQuery"/>
<add tagPrefix="DotNetAge" assembly="DNA" namespace="DNA.UI"/>



</controls>
</pages>
<!-- Must be specified when compressing Webresources.axd on share hosting that doesn't permit reflection (as GoDaddy hosting) -->

<!--<machineKey validationKey="D9414F26B8A5602E55FE91C8AF9033B3AEC545EFA14F7F243DC00333602040F9D839AB9608673E802FE426AEA1D0BAB74F5F99CEEBA1DC69D290F7EC94BD09FE" decryptionKey="57529A1AA30F3396A0B5690FCAD576A1DBE861BDA05EC52B794228A5592B6156" validation="SHA1" decryption="AES"/>-->

<!--

i tried enabling and disabling above also 

-->

   

<httpHandlers>
<remove path="*.asmx" verb="*"/>
<add path="*.asmx" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="*_AppService.axd" verb="*" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="ScriptResource.axd" verb="GET,HEAD" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
<add path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=3.1.9.807, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" validate="true"/>
<!--<remove verb="GET,HEAD,POST" path="*"/>
<add verb="GET,HEAD,POST" path="*" type="StaticFileHandler"/>-->
<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"/>



</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<!--<add name="HttpCompressionModule" type="HttpCompressionModule"/>-->
<add name="WebResourceCompressionModule" type="Miron.Web.MbCompression.WebResourceCompressionModule, MbCompression"/>
<add name="MbCompressionModule" type="Miron.Web.MbCompression.MbCompressionModule, MbCompression"/>

</httpModules>

</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--
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>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="WebResourceCompressionModule" type="Miron.Web.MbCompression.WebResourceCompressionModule, MbCompression"/>
<add name="MbCompressionModule" type="Miron.Web.MbCompression.MbCompressionModule, MbCompression"/>


</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="Telerik.ReportViewer.axd_*" path="Telerik.ReportViewer.axd" verb="*" type="Telerik.ReportViewer.WebForms.HttpHandler, Telerik.ReportViewer.WebForms, Version=3.1.9.807, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" preCondition="integratedMode,runtimeVersionv2.0"/>
<add name="JsHandler" verb="*" path="jslib.axd" type="Miron.Web.MbCompression.JavaScriptCompressionHandler, MbCompression" preCondition="integratedMode"/>
<add name="CssHandler" verb="*" path="css.axd" type="Miron.Web.MbCompression.CssCompressionHandler, MbCompression" preCondition="integratedMode"/>



</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding>
</runtime>

<!-- This section is not an obligation. Add it if you needs to change the default values
cachingStorage="OutputCache / FileSystem"-->
<Miron.web>

<CompressorSettings compressCSS="true" reflectionAlloweded="true" compressJavaScript="true" compressPage="true" combineCSS="true" combineHeaderScripts="true" compressWebResource="true" minifyContent="true" cachingStorage="OutputCache" autoMode="true" scriptsVersion="1" cssVersion="1">
<excludePaths>
<!--<add key="~/test_login.aspx"/>-->
</excludePaths>
<excludeFromMinifyPaths>
<!--<add key="~/app_themes/default/theme.css"/>-->
</excludeFromMinifyPaths>
</CompressorSettings>
</Miron.web>


</configuration>

Nov 26, 2009 at 10:41 PM

It looks that the page is been double compressed. Check that your server, where you published your site, it was not configured for compression.