UPDATE 07/19/2013: As pointed out in the comments by Ray Moro, a better way to fix this may be to remove the extension from your bundle name. So /bundle/myscrips.js becomes /bundle/myscriptsthis will cause it to run the module without having to change the config settings below.

That's a mouthful of a title.

If you're using ScriptBundle and StyleBundle's in an ASP.NET MVC4 app and you're suddenly getting 404 errors even though EnableOptimizations is set to true make sure you have the following in yourWeb.Config in the system.webServer section:

  1. <modules runAllManagedModulesForAllRequests="true">  
  2.   <remove name="BundleModule" />  
  3.   <add name="BundleModule" type="System.Web.Optimization.BundleModule" />  
  4. </modules>  

I've wasted incalculable amounts of time on this issue, TWICE!!! I don't know why this isn't in the web.config by default or better yet not needed to use Bundling.

출처 : http://sports.news.nate.com/view/20140830n05951?mid=s1005

+ Recent posts