0

왜 내가MVC 번들 축소에서는이 Umbraco와 404를 반환 7.2.1 나는 밖으로 일을 할 수있어

BundleTable.EnableOptimizations를 켜면 내가, 404을 받고 있어요 = 거짓;

후 모든 확인을 작동하지만,

로 설정

BundleTable.EnableOptimizations = TRUE;

는 내가

를 얻을

자원을로드하지 못했습니다 : 서버가

내가이 문제를 해결할 수 없습니다 (찾을 수 없음) (404) 의 상태로 반응과는 CSS에 대한 발생 , js 번들은 어떤 도움을 주셔도 감사합니다. 내가 VS2015과 Umbraco을 사용하고

7.2.1

using System.Web.Optimization; 

namespace Web.UI 
{ 
    public class BundleConfig 
    { 
     // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 
     public static void RegisterBundles(BundleCollection bundles) 
     { 
      bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
         "~/Scripts/jquery-{version}.js")); 

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

      // Use the development version of Modernizr to develop with and learn from. Then, when you're 
      // ready for production, use the build tool at http://modernizr.com to pick only the tests you need. 
      bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
         "~/Scripts/modernizr-*")); 

      bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
         "~/Scripts/bootstrap.js", 
         "~/Scripts/bootstrap-datepicker.js", 
         "~/Scripts/respond.js")); 

      bundles.Add(new StyleBundle("~/Content/css").Include(
         "~/Content/bootstrap.css", 
         "~/Content/font-awesome.min.css", 
         "~/Content/PagedList.css", 
         "~/Content/bootstrap-datepicker.css", 
         "~/Content/site.css")); 

      BundleTable.EnableOptimizations = true; 
     } 
    } 
} 

using System.Web.Optimization; 
using Umbraco.Core; 

namespace Web.UI 
{ 
    public class ApplicationEvents : ApplicationEventHandler 
    { 
     protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) 
     { 
      BundleConfig.RegisterBundles(BundleTable.Bundles); 
     } 
    } 
} 

<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/bundles/" /> 


@inherits UmbracoTemplatePage 
<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8" /> 
    <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
    <title>@ViewBag.Title</title> 
    <meta name="description" content="@ViewBag.Description" /> 
    @Styles.Render("~/Content/css") 
    @Scripts.Render("~/bundles/modernizr") 
</head> 
<body> 

    <div class="container"> 
     <div class="row"> 
      <div class="col-lg-10" style="text-align: center"> 
       <img src="../../Images/Sitelogo.png" alt="Logo" width="300" />    
      </div> 
     </div> 
     <div class="row"> 
      <div id="custom-bootstrap-menu1" class="navbar navbar-default " role="navigation"> 
       <div class="container-fluid"> 
        <div class="navbar-header"> 
         <a class="navbar-brand" href="/"><i class="fa fa-home">&nbsp;</i></a> 
         <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-menubuilder"> 
          <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span> 
         </button> 
        </div> 
        <div class="collapse navbar-collapse navbar-menubuilder"> 

        </div> 
       </div> 
      </div> 
     </div> 
    </div> 
    <div class="container bottomPadding"> 
     @RenderBody() 
    </div> 
    <div class="container"> 
     <div class="row"> 
      <div class="col-lg-12"> 
       <footer role="navigation"> 
        <p>@Umbraco.RenderMacro("CopyrightDate")</p> 
       </footer> 
      </div> 

     </div> 
    </div> 
    @Scripts.Render("~/bundles/jquery") 
    @Scripts.Render("~/bundles/jqueryval") 
    @Scripts.Render("~/bundles/bootstrap") 

    @RenderSection("scripts", required: false) 
    @RenderSection("datepicker",false) 

</body> 
</html> 

<add namespace="System.Web.Optimization"/> 

가보기 폴더

답변