This project has moved. For the latest updates, please go here.

Error 404

Jun 5, 2013 at 4:36 PM
Edited Jun 5, 2013 at 4:42 PM
HI!
I decided use the "Bundle Transformer" to my an existing project (ASP.NET MVC 3)

I added BundleTransformer.Core (v. 1.6.28.0) in references and added the following code:

Global.asax.cs

protected void Application_Start()
        {
            SitePolicy.Init();
            ...
            BundleConfig.RegisterBundles(BundleTable.Bundles);
        }

BundleConfig.cs

public static void RegisterBundles(BundleCollection bundles)
        {
            var nullBuilder = new NullBuilder();
            var cssTransformer = new CssTransformer();
            var nullOrderer = new NullOrderer();

            var commonStylesBundle = new Bundle("~/Bundles/CommonStyles");
            commonStylesBundle.Include(
                "~/assets/css/core.css",
                "~/assets/css/jquery.fancybox-1.3.4.css",
                "~/assets/css/cookie.css",
                "~/assets/css/print.css"
                );

            commonStylesBundle.Builder = nullBuilder;
            commonStylesBundle.Transforms.Add(cssTransformer);
            commonStylesBundle.Orderer = nullOrderer;
            bundles.Add(commonStylesBundle);
        }
And use this code in meta.cshtml.
@Styles.Render("~/Bundles/CommonStyles")
But, for the Bundle I get Error 404 (not found)
Image

PS. I Checked this code in new project (asp.net mvc 3) and this code working.
How do You think what could be the problem?
Coordinator
Jun 6, 2013 at 12:18 PM
Hello, vasilega!

You answered on your own question. The problem is probably in the settings of web application (it is possible that this is a problem with routing settings).

Compare settings of old and new project.