4

I've tried accessing Cassette's debugging page to see what's what, but all I get is a blank page (Firebug says I'm receiving a 404 header). Don't really know why:

www.foobar.com/_cassette
               ^-----------This is the debugger page for Cassette.

I'm using ASP.Net MVC3 with Cassette for asset bundling and minification.

Everything is working correctly on my dev machine, but when deploying to the hosting server, this is the message I receive:

Server Error in '/' Application.

Cannot find an asset bundle containing the path "~/Public/stylesheets/main.less".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Cannot find an asset bundle containing the path "~/Public/stylesheets/main.less".

Again: Everything works correctly on my dev machine.

Here is my CassetteConfiguration file:

public void Configure(BundleCollection bundles, CassetteSettings settings)
{    
    bundles.Add<StylesheetBundle>("~/Public/stylesheets");
    bundles.Add<ScriptBundle>("~/Public/javascripts");
}

And in my _Layout.cshtml file:

@{
    Bundles.Reference("~/Public/stylesheets/bootstrap.css");
    Bundles.Reference("~/Public/stylesheets/main.less");
}

I'm using a Shared "Cloud" hosting from Vidahost.

What steps can I take to debug this problem? I've been working on it all afternoon and so far haven't broken new ground.

Thank you!

Only Bolivian Here
  • 35,719
  • 63
  • 161
  • 257
  • Did you have any luck with this? I'm having exactly the same problem – ipr101 Jul 25 '12 at 19:51
  • @ipr101: This problem only happens when hosting the app on Vidahost (a shared hosting environment). I imagine this has something to do with folder writing permissions, since the _cassette folder is create on the fly. Unfortunately I have not found a solution, I just switched to my own VPN server to avoid these issues. – Only Bolivian Here Jul 25 '12 at 19:53
  • Thanks for the speedy response. I've been having the same problems with a website running on discount.asp which I suspect maybe due to similar issues. I think I'll just stop using 'cassette' in the solution for the time being. – ipr101 Jul 25 '12 at 21:58

1 Answers1

0

Try to add below in BundleConfig file

public static void RegisterBundles(BundleCollection bundles)
        {
            bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                        "~/Scripts/jquery-1.*"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                        "~/Scripts/jquery-ui*"));

            bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                        "~/Scripts/jquery.unobtrusive*",
                        "~/Scripts/jquery.validate*"));

            bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                        "~/Scripts/modernizr-*"));

            bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));

            bundles.Add(new StyleBundle("~/Content/themes/base/css").Include(
                        "~/Content/themes/base/jquery.ui.core.css",
                        "~/Content/themes/base/jquery.ui.resizable.css",
                        "~/Content/themes/base/jquery.ui.selectable.css",
                        "~/Content/themes/base/jquery.ui.accordion.css");
        }
cracker
  • 4,900
  • 3
  • 23
  • 41