I have an ASP.NET MVC 5 project that uses dotless for parsing/compiling .less files and standard bundler for minifying/bundling js files.
The issue is that on production server cache-conrole header is set to max-age=0, no-cache, no-store when locally on IIS express it's set to public and expires in a year.
Dotless config: <dotless minifyCss="true" cache="true" web="true" handleWebCompression="false" />
Bundle config - just includes and BundleTable.EnableOptimizations = true;
Few web config sections that may help:
<staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" /> </staticContent> ... <modules runAllManagedModulesForAllRequests="true"> <add name="Prerender" type="Prerender.io.PrerenderModule, Prerender.io, Version=1.0.0.2, Culture=neutral, PublicKeyToken=null"/> <add name="Spring" type="Spring.Context.Support.WebSupportModule, Spring.Web" /> <add name="OpenSessionInView" type="Spring.Data.NHibernate.Support.OpenSessionInViewModule, Spring.Data.NHibernate32" /> </modules> ... <handlers> <remove name="OPTIONSVerbHandler" /> <remove name="TRACEVerbHandler" /> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> <add name="dotless" path="*.less" verb="GET" type="dotless.Core.LessCssHttpHandler,dotless.Core" resourceType="File" preCondition="" /> </handlers> I tried to add mime maps to staticContent section. Also thought about adding request headers in iis, but it works only for files/folders so it likely will not serve bundle.
What have I missed in configs? I appreciate any idea for fixing the issue.