I\'m using the ASP.NET MVC 4 bundling and minifying features in the Microsoft.AspNet.Web.Optimization namespace (e.g. @Styles.Render(\"~/content/static/css\")
).
You can define origin domain as Azure's website (this probably was added long after the original question).
Once you have CDN endpoint, you will need to allow query string for it and then you can reference directly to bundles via CDN:
I've also created this helper to append CDN host name:
public static IHtmlString RenderScript(string virtualPath)
{
if (HttpContext.Current.IsDebuggingEnabled)
return Scripts.Render(virtualPath);
else
return new HtmlString(String.Format(
CultureInfo.InvariantCulture,
Scripts.DefaultTagFormat,
"//CDN_HOST" + Scripts.Url(virtualPath).ToHtmlString()));
}