Combres route (combres.axd) does not work

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

When I launch my site, I can not get combres.axd to work? I know that combres works, because the wrong file in my xml will throw an error. I am running an ASP.NET 4.0 web form site on Vista.

My Combres XML Settings.

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

I checked web.config for all the correct values. The link was 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 that the value is being created in the html source.

 href="/combres.axd/siteCss/309885723" src="/combres.axd/siteJs/408582048" 

I am not getting an error or anything else to help me find the reason why it will not work or that I might have missed. Any suggestions would be great.

+6
combres
source share
6 answers

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

Before calling, make sure that the Combres route is added to ignore the {resource} .axd route.

Correctly:

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

Wrong:

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

Firstly, I suggest connecting log4net to combres log in your web.config (don't forget to configure the configuration 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 run the configuration

 log4net.Config.XmlConfigurator.Configure() 

You should have a detailed log of what is happening. If something goes wrong, don’t hesitate to come back with a log

+1
source share

For some reason, the only way to fix css showing in debug = false mode is to add combres.axd to anonymous access in web.config

  <location path="combres.axd"> <system.web> <authorization> <allow users="*" /> </authorization> </system.web> </location> 
+1
source share

What are the settings for your modules in web.config? Check the runAllManagedModulesForAllRequests attribute.

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

With an outdated WebForms application, I found that I did not have this parameter, and as soon as I put it in, combres.axd worked.

More about my question too

0
source share

These are the changes that I made in the project, and he stated that he was working correctly.

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 the Combres.cs file.

0
source share

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

Therefore, to fix this, I simply lowered Yahoo.Yui.Compressor to version 1.5.

And now I'm happy :)

0
source share

All Articles