Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik 1608 posts 7234 karma points MVP 7x c-trib
    Oct 14, 2015 @ 00:08
    Nik
    0

    ClientDependency Issue - Works once then fails

    Hi All,

    I have another ClientDependency issue and the normal fix of clearing the cache and increasing the version number isn't solving it. Well that's not entirely true let me explain.

    The issue I'm having is that when I first visit a page everything is working fine. ClientDependency happily detects dependencies, minifies files generates links etc etc. Everything that it is supposed to do.

    However, I then browse around the site, visit a couple of pages and then return to the home page and Boom, it's broken. It is no longer rendering the links, it's posting entries that read:

    <!-- CDF: No CSS dependencies were declared //-->
    <!-- CDF: No JS dependencies were declared //-->
    

    The problem is, this isn't true! There are dependencies and without them the site doesn't render elements properly and the styling is completely screwed.

    So my first port of call was delete the client dependency cache, find the config file and increase the version number by one. I potter off and do this, save the file and then reload the home page.

    Hmm, it's working I think.

    Nope, I browse to another page, then return to the home page and it's doing the same thing.

    Umbraco version 7.2.8 Tested in Chrome and IE11 Tried clearing Umbraco Cache, Local PC cache

    Any ideas would be great!

    Thanks guys.

  • Javier Callico 5 posts 26 karma points
    Dec 07, 2015 @ 22:06
    Javier Callico
    1

    I had a similar problem and it was caused by the size of the query string on requests generated by the ClientDependency library.

    Adding this entry to the web.config under the system.webServer section solved my problem:

    <!-- Allow for long query strings; needed by ClientDependency -->
        <security>
          <requestFiltering>
            <requestLimits maxQueryString="32768"/>
          </requestFiltering>
        </security>  
    

    Here is an article with more information: http://stackoverflow.com/questions/11636386/how-to-configure-the-web-config-to-allow-requests-of-any-length

Please Sign in or register to post replies

Write your reply to:

Draft