Umbraco's DependencyHandler - ClientDependency (dependencyhandler.axd)

When you see requests for a mysterious resource called dependencyhandler.axd in the Umbraco BackOffice, it's a reference to Shazwazza's open source project that's integrated into Umbraco called the ClientDependency Framework (or CDF).

ClientDependency is primarily tasked with managing CSS & Javascript dependencies for the Umbraco Backoffice (and your website, if you're not using Grunt/Gulp etc).

Here's an example of the DependencyHandler in action:


Common Issues & Troubleshooting Tips

Here are a couple of tips that should hopefully help you work through most issues that arise from working with dependencyhandler. Note that most issues are probably due to the content the CDF is delivering, and not the framework itself!

Javascript Errors: Disable DependencyHandler Bundling & Debug

If you're seeing Javascript errors thrown by the content brought back by a call to the dependencyhandler.axd, chances are it's an issue with something in the Javascript bundle or CDF cache rather than the ClientDependency Framework itself, e.g:


The good news is you can disable all combining, caching & compressing tasks by changing the debug attribute of the compilation tag in your web.config to true:

 <compilation defaultLanguage="c#" debug="true" targetFramework="4.5">

Old Code: Clear ClientDependency Cache

If you're running in production and want to make sure changes to some files you've dropped in are picked up, follow the following:

  • Delete all files in your website's /App_Data/ClientDependency and /App_Data/TEMP/ClientDependency folders
  • Restart your site's App Pool
  • Clear your browser history

Check Configuration

There are a couple of different places within your Umbraco app that the DependencyHandler is configured:

  • ClientDependency.config in the /config folder: A small configuration file. Most settings in here won't need to be changed from those that come out of the box with Umbraco.
  • Web.config: There are around half a dozen entries in the web.config folder registering ClientDependency as a module, pointing to the config file etc. Check out an example of a fresh install of Umbraco's web.config for your version if you think something's missing.

Further Reading

If you're interested in how the ClientDependency Framework works under the hood, I'd encourage you to check out the GitHub repo and official documentation for more info!

Show Comments