Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-mvc/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net mvc 我如何找出MVC5属性路由为什么不是';是否正在将添加到路由表?_Asp.net Mvc_Asp.net Mvc 5_Asp.net Mvc Routing - Fatal编程技术网

Asp.net mvc 我如何找出MVC5属性路由为什么不是';是否正在将添加到路由表?

Asp.net mvc 我如何找出MVC5属性路由为什么不是';是否正在将添加到路由表?,asp.net-mvc,asp.net-mvc-5,asp.net-mvc-routing,Asp.net Mvc,Asp.net Mvc 5,Asp.net Mvc Routing,由于某种原因,我有一些属性路由没有被添加到路由表中 我找到了这个 但对我来说,这不是解决办法。有没有办法找出为什么没有添加路线 谢谢 john您正在呼叫MapAttributeRoutes public static void RegisterRoutes(RouteCollection routes) { // See http://github.com/mccalltd/AttributeRouting/wiki for more options. // To de

由于某种原因,我有一些属性路由没有被添加到路由表中

我找到了这个

但对我来说,这不是解决办法。有没有办法找出为什么没有添加路线

谢谢


john

您正在呼叫
MapAttributeRoutes

public static void RegisterRoutes(RouteCollection routes) 
{    
    // See http://github.com/mccalltd/AttributeRouting/wiki for more options.
    // To debug routes locally using the built in ASP.NET development server, go to /routes.axd

    routes.MapAttributeRoutes();
}

使用一瞥:。请参见此处:我的问题发生在将路由添加到路由表的过程中,由于某些原因,某些路由没有被添加。我想这只会显示路由表的状态,对吗?是的,你能发布你的代码吗?奇怪的是,有些路由有效,而另一些路由无效。我将致力于将应用程序剥离到一个基本的失败点。一些路由有效,而其他路由无效。我正在调用
routes.mapmvcattributteroutes()