Bundle of Kendo UI is not working in IIS

前端 未结 3 1617
离开以前
离开以前 2021-01-06 17:16

I am developing an application in ASP.NET MVC 4 using Kendo UI, and the entire application works perfectly by running Visual Studio 2012, but when publishing to the IIS bund

相关标签:
3条回答
  • 2021-01-06 17:56

    Found this documentation on the matter explains everything very well,

    Hope this helps

    0 讨论(0)
  • 2021-01-06 18:05

    Change version number (2016.1.112) and try this:

    BundleConfig.cs

    bundles.Add(new StyleBundle("~/Content/kendo/2016.1.112/kendostyles").Include(
                          "~/Content/kendo/2016.1.112/kendo.common-bootstrap.min.css",
                          "~/Content/kendo/2016.1.112/kendo.mobile.all.min.css",
                          "~/Content/kendo/2016.1.112/kendo.dataviz.min.css",
                          "~/Content/kendo/2016.1.112/kendo.bootstrap.min.css",
                          "~/Content/kendo/2016.1.112/kendo.dataviz.bootstrap.min.css"));
    
    BundleTable.EnableOptimizations = true;
    

    _Layout.cshtml

    @Styles.Render("~/Content/kendo/2016.1.112/kendostyles")
    
    0 讨论(0)
  • 2021-01-06 18:06

    I managed to solve the problem by changing the virtual path "~/Content/kendo" to "~/Content/kendoui". In my project there is a physical path "~/Content/kendo" and the virtual path can not match the physical path.

    Below is the corrected code:

            bundles.Add(new StyleBundle("~/Content/kendoui").Include(
                        "~/Content/kendo/2013.1.514/kendo.common.min.css",
                        "~/Content/kendo/2013.1.514/kendo.blueopal.min.css",
                        "~/Content/kendo/2013.1.514/kendo.dataviz.min.css",
                        "~/Content/kendo/2013.1.514/kendo.dataviz.blueopal.min.css"));
    

    I thank the attention G_P and Win.

    0 讨论(0)
提交回复
热议问题