6

I have followed the article http://www.codeproject.com/KB/aspnet/combres2.aspx.

When I run my site I cannot get the combres.axd to work ? I know that the combres is running since an incorrect file in my xml will cause an error. I am running an ASP.NET 4.0 web forms site on vista.

My Combres XML settings are.

resourceSets url="~/combres.axd" defaultDuration="30" defaultVersion="auto" defaultDebugEnabled="auto"

I have checked the web.config for all correct values. The reference has been added from the merge directory and the global ASX file has the following.

protected void Application_Start(object sender, EventArgs e)
        {
            RouteTable.Routes.AddCombresRoute("Combres");
        }

I also checked the value is created in the html source.

href="/combres.axd/siteCss/309885723"

  src="/combres.axd/siteJs/408582048"

I do not get an error or anything to help me track down the reason it will not work or what I may have missed. Any suggestions would be great.

Rahul
  • 5,603
  • 6
  • 34
  • 57
Aaron
  • 61
  • 1
  • 3
  • I got the same error (404 not found on /combres.axd/siteCss/883839792). Any ideas? – jao Jul 21 '10 at 09:35

6 Answers6

6

I had the same problem when trying to get it to work for the first time.

Make sure that the Combres route is added before the call to ignore the route {resource}.axd.

Correct:

RouteTable.Routes.AddCombresRoute("Combres");
RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

Incorrect:

RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
RouteTable.Routes.AddCombresRoute("Combres");
JCallico
  • 1,446
  • 18
  • 25
1

For some reason the only way we could fix showing css in debug=false mode is by adding combres.axd to the anonymous access in web.config

  <location path="combres.axd">
    <system.web>
      <authorization>
        <allow users="*" />
      </authorization>
    </system.web>
  </location>
Dr Alex
  • 21
  • 3
1

First, i'd suggest to hook a log4net to the combres logger in your web.config (don't forget to setup the configsection for log4net)

<log4net>
<logger name="Combres">
  <level value="ALL"/>
  <appender-ref ref="LogCombres" />
</logger>

<appender name="LogCombres" type="log4net.Appender.RollingFileAppender">
  <file value="Combres.log.txt"/>
  <appendToFile value="true"/>
  <maximumFileSize value="5000KB"/>
  <maxSizeRollBackups value="2"/>
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%d [%t] %-5p %c - %m%n"/>
  </layout>
</appender>
</log4net>

And in your global.asax launch the configuration

log4net.Config.XmlConfigurator.Configure()

You should have a detailed log of what's happening. If what's wrong doesn't pop out, don't hesitate to come back with some log output

samy
  • 14,832
  • 2
  • 54
  • 82
0

What is your modules setting in web.config? Check for the runAllManagedModulesForAllRequests attribute.

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>

With a legacy WebForms app, I found I did not have that setting and once I put it in, the combres.axd route worked.

More on my question too

Community
  • 1
  • 1
RyanW
  • 5,338
  • 4
  • 46
  • 58
0

These are the changes i did in the project and it stated to run properly.

In the Global.asax file add these lines

using Combres;

In the application_start method

protected void Application_Start()
{
    RouteTable.Routes.AddCombresRoute("Combres");//Add this line
    RegisterRoutes(RouteTable.Routes);
} 

Comment out the line in Combres.cs file.

Mangesh
  • 3,987
  • 2
  • 31
  • 52
0

This happened to me too but the problem was from Yahoo.Yui.Compressor they changed one property signature in their new version 1.6*.

So to fix it i just down the Yahoo.Yui.Compressor to version 1.5.

And i'm happy now :)

Wahid Bitar
  • 13,776
  • 13
  • 78
  • 106