0

Visual Studio 2012 - Asp.net MVC3

私はマイクロソフトのasp.net Web最適化フレームワークを使用してバンドルと縮小を作成していますが、バンドルと縮小を使用するときに問題があり、すべてが正常に機能しますが、仮想ディレクトリを作成して物理ディレクトリ(フォルダ)を作成する必要があります私の縮小、バンドル、および画像を含むAmazon s3。

私のコードはローカルで 100% 正常に動作します。ここに私のコード

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"));
}

私のレイアウトビューで

<!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>

これを行う方法はありますか?

4

1 に答える 1

0

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

これにより、バンドルが amazon にアップロードされ、そこからサービスが提供されます。かなりきれい。

于 2015-04-14T14:32:47.040 に答える