因为路径误认为一个控制器路径捆绑失败 [英] Bundling fails because path mistaken for a controller path

查看:185
本文介绍了因为路径误认为一个控制器路径捆绑失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我BundleConfig我有

In my BundleConfig I have

bundles.Add(new StyleBundle("~/Content/css/css").Include("~/Content/css/wireframe.css?v=1.0"));

在我看来,我有

@Styles.Render("~/Content/css/css")

但是,当我访问的页面而言,我得到一个404,此错误

But when I access the page concerned I get a 404 with this error

[HttpException]: The controller for path '/Content/css/css' was not found or does not implement IController.

看来路径被混淆的控制器。更改我的WebApiConfig和RouteConfig文件?

It seems the path is being confused for a controller. Do I change my WebApiConfig and RouteConfig files?

推荐答案

小学生的错误。我在Global.asax缺少此

Schoolboy error. I was missing this in the Global.asax

BundleConfig.RegisterBundles(BundleTable.Bundles);

这篇关于因为路径误认为一个控制器路径捆绑失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆