model view controller - MVC bundle with Azure CDN - how to enable caching -


i have web site hosted in azure has lot of javascript , css small pages. have javascript , css delivered via cdn.

azure provides neat , convenient mechanism allow described here https://azure.microsoft.com/en-us/documentation/articles/cdn-cloud-service-with-cdn/#integrate-aspnet-bundling-and-minification-with-azure-cdn

in short, add following code bundleconfig.cs

bundles.usecdn = true;  var version = system.reflection.assembly.getassembly(typeof(controllers.homecontroller))     .getname().version.tostring(); var cdnurl = "http://axxxxxx6.vo.msecnd.net/{0}?v=" + version;   scriptbundle scriptbundle = new scriptbundle("~/bundles/xx", string.format(cdnurl, "bundles/xx"));  scriptbundle.include(             "~/scripts/modernizr-*",             "~/scripts/jquery-{version}.js",             "~/scripts/jquery.signalr-{version}.js",             "~/scripts/jquery.watermark.js", .... 

i have followed instructions letter , on surface appears work expected.

but realised caching these cdn provided resources disabled. every time web page requested js , css downloaded again - defeats purpose of cdn altogether.

enter image description here

i have included following in web.config

    <staticcontent>        <clientcache cachecontrolmode="usemaxage" cachecontrolmaxage="15.00:00:00"/>     </staticcontent> 

what missing here?

thanks in advance.

dave a


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -