在路由表中没有路由提供的值&QUOT匹配

在路由表中没有路由提供的值&QUOT匹配

本文介绍了RedirectToAction原因及QUOT;在路由表中没有路由提供的值&QUOT匹配;在ASP.NET MVC 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我最近升级到ASP.NET MVC 3,在我的本地机器上的一个项目,一切工作正常。当我部署到服务器,我得到一个错误,只要我使用 RedirectToAction 电话。它抛出一个 System.InvalidOperationException 与错误消息的在路由表中没有路由提供的值相匹配。的我的假设是,有一些配置问题在服务器上,但我不能似乎能够找到答案。

I have a project that I recently upgraded to ASP.NET MVC 3. On my local machine, everything works fine. When I deploy to the server, I get an error anytime I use a RedirectToAction call. It throws a System.InvalidOperationException with the error message No route in the route table matches the supplied values. My assumption is that there is some configuration problem on the server, but I can't seem to be able to figure it out.

推荐答案

我有一个类似的问题,一旦与 RedirectToAction ,并发现你需要一个有效的途径注册的线索该行动。

I had a similar problem once with RedirectToAction and found out that you need a valid route registered that leads to that action.

这篇关于RedirectToAction原因及QUOT;在路由表中没有路由提供的值&QUOT匹配;在ASP.NET MVC 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 07:29