Questions tagged [asp.net-optimization]

Questions related to the ASP.NET Microsoft.AspNet.Web.Optimization nuGet package (System.Web.Optimization namespace), which supports bundling and minification of javascript and css files.

Project homepage: https://archive.codeplex.com/?p=aspnetoptimization

The Web optimization framework is installed via NuGet at https://nuget.org/packages/Microsoft.AspNet.Web.Optimization

Description:

The ASP.NET Web optimization framework provides services to improve the performance of your ASP.NET Web applications. Current services provided by the framework include:

bundling - combining multiple scripts or style resources together into a single resource, and thereby requiring browsers to make fewer HTTP requests

minification - making scripts or styles smaller using techniques such variable name shortening, white space elimination, etc.

Additionally, the framework has multiple extensibility points, enabling you to add new services over time.

174 questions
3
votes
1 answer

System.web.optimization AssetManager increases memory usage

I am doing so memory analysis for our project there is excessive usage of memory. This is what I got when I did a deep analysis.
Rıfat Erdem Sahin
  • 1,738
  • 4
  • 29
  • 47
3
votes
2 answers

ASP.NET Bundling: Run IBundleTransform even when not optimizing

We're using System.Web.Optimization bundling to bundle & compress our JS and CSS. We also use a custom IBundleTransform implementation in addition to to the existing JsMinify and CssMinify to do some fancy stuff to the JS (replacement of certain…
Hannes Sachsenhofer
  • 1,835
  • 1
  • 23
  • 38
3
votes
2 answers

Why Can't I Minify Angular.js?

I'm trying to use Microsoft's Web Optimization bundling toolkit, which works well for everything else. When I try to ask it to minify AngularJS, though, I get this error message in the resultant Javascript output: "Ambiguous reference to named…
blaster
  • 8,876
  • 11
  • 48
  • 77
3
votes
1 answer

Is there any way to read System.Web.Optimization contents from code-behind?

Is there any way to read System.Web.Optimization contents from code-behind? I tried poking around the dll, but I couldn't find a way to read the bundle contents (as far as I can tell, it was meant to work via a handler, which handles the calls to…
3
votes
1 answer

Get ASP.NET bundle URL for use with CDN?

I'm using the ASP.NET bundling feature and want to know how I can get the URL returned by the Render helpers such as Scripts.Render("~/bundles/scripts"). Currently the optimized output is has a relative URL. I want to use a CDN that does…
Brian Vallelunga
  • 9,869
  • 15
  • 60
  • 87
3
votes
1 answer

Rendering DynamicFolderBundle?

I'm trying to add a bundled folder so I don't have to manually add each new .less file to the usual bundles, but I don't know how to render it out. In the BundleConfig, BundleTable.Bundles.Add(new DynamicFolderBundle("Content/autobundled",…
3
votes
1 answer

How to manage sub-domains on winhost with URL Rewrite and ASP.NET Optimization's bundles

I am using ASP.NET MVC4 with WinHost. Just like the question asked here, I ran into the same issue: I'm trying out WinHost and I'm running into some issues with sub-domains. On WinHost, you can have multiple sub-domains per hosting account, but…
3
votes
1 answer

System.Web.Optimization bundles are empty when running in a virtual directory

I'm having problems when deploying my application to a server using a virtual directory in IIS. I have configured the same files to run under the default website in a virtual directly and also in a new website root running on port 81. Both…
Rob Bird
  • 3,764
  • 2
  • 28
  • 38
3
votes
2 answers

Why isn't my Scripts.RenderSection working for jqGrid?

I am using Visual Studio 2012 and MVC 4, and in my _Layout.cshtml, I have the following:
Scottie
  • 11,050
  • 19
  • 68
  • 109
3
votes
1 answer

When to use bundles in MVC4

In MVC 4 I can use @Styles.Render("~/Content/css") to called a bundle of CSS files defined BundleConfig file instead of calling the CSS directly. When should we use bundle instead of calling directly the file? I understand it clearly when we have…
3
votes
1 answer

Error in MVC4-RC (.net 4.0) with Microsoft ASP.NET Web Optimization Framework

I'm using latest MVC4-RC (.net 4.0) with Microsoft ASP.NET Web Optimization Framework http://nuget.org/packages/Microsoft.AspNet.Web.Optimization/1.0.0-beta3 and I'm receiving this error. Method not found: 'Void…
FrEaKmAn
  • 1,785
  • 1
  • 21
  • 47
2
votes
0 answers

Add other projects stylesheet to Bundleconfig

I have a common solution MyApp. Within this, I have more than 2 projects like MyCommon,MyInclude,MyWeb. I want to place stylesheets,scripts in a common project and refer them in other projects. Now I refer my stylesheets in MyWeb project by adding…
KaviSuja
  • 450
  • 1
  • 9
  • 37
2
votes
1 answer

CSS minification and bundling replaces 0px with 0 in calc, so content doesn't render properly

I'm using Microsoft.AspNet.Web.Optimization (1.1.3) from an MVC 5.1 site to bundle and minify my CSS and it is replacing values of 0px with 0 in release mode and this causes rendering issues. Is it possible to stop this behavior somehow? This…
chrisp_68
  • 1,731
  • 23
  • 41
2
votes
1 answer

register bundle for "jqgrid" in scriptmanager

I am new to bundle and optimization and trying to understand. I am creating bundle in site containing Webform and .Net Framework 4.0. I have created 'BundleConfig.cs' in which i am creating bundles. it has following code: public static void…
2
votes
2 answers

minifying signalr hubs auto-generated proxy

My app is using a SignalR 1.1.2 on ASP.NET MVC It has the following call in the View This uses the auto-generated hub. At this point all client and server side methods are done. Can I get a copy of the 'hubs.js' file I get when I paste this link…