0

Visual studio 2012 - Asp.net MVC3

I am using microsoft asp.net web optimization framework to make the bundle and minification, but I have a problem when using the bundle and minification, everything works normal place, but I need the virtual directory is created created a physical directory (folder) on amazon s3 with my minifications, bundle and images.

my code work local 100% ok, here my code

protected void Application_Start()
{
 BundleTable.EnableOptimizations = true;
 RegisterBundles(BundleTable.Bundles);
 AreaRegistration.RegisterAllAreas();
 RegisterGlobalFilters(GlobalFilters.Filters);
 RegisterRoutes(RouteTable.Routes);
}

public static void RegisterBundles(BundleCollection bundles)
{
/ * This example ~ / Content / css would be a physical folder containing the bundle, images and css minificados have a separate server just for images and css and javascript * /
     bundles.Add(new StyleBundle("~/Content/css").Include(
                            "~/Content/Site.css"));
}

in my layout view

<!DOCTYPE html>
<html>
<head>
    <title>@ViewBag.Title</title>
    @System.Web.Optimization.Styles.Render("~/Content/css")
</head>
<body>
    <div class="page">
        <div id="header">
            <div id="title">
                <h1>My MVC Application</h1>
            </div>
            <div id="logindisplay">
                @Html.Partial("_LogOnPartial")
            </div>
            <div id="menucontainer">
                <ul id="menu">
                    <li>@Html.ActionLink("Home", "Index", "Home")</li>
                    <li>@Html.ActionLink("About", "About", "Home")</li>
                </ul>
            </div>
        </div>
        <div id="main">
            @RenderBody()
        </div>
        <div id="footer">
        </div>
    </div>
</body>
</html>

any idea how to do this?

thefirexa
  • 3
  • 3
  • What is the exact problem? Your question is hard to understand. – MikeSmithDev Apr 04 '13 at 18:24
  • I need to bundle my js and css files, except that instead of generating a virtual directory, I want this directory there is a folder on my server AmazonS3 example ~ / ContentOfAmazon / css <= I need this virtual directory that is a folder on my server amazon s3 - which is a server images, css and javascript. In this folder will minificados my css, javascript and images. bundles.Add (new StyleBundle ("~ / ContentOfAmazon / css"). Include ..... – thefirexa Apr 04 '13 at 18:53

1 Answers1

0

http://blogs.lessthandot.com/index.php/webdev/serverprogramming/making-squishit-work-with-amazon/

This uploads your bundles to amazon and serve from there. Pretty neat.

Axar
  • 521
  • 1
  • 3
  • 11