【发布时间】:2011-04-12 08:16:55
【问题描述】:
我一直在尝试解决这个问题,但找不到任何问题的答案。我遇到的问题是这个网址:
localhost:343434/Lev/Details/1/4/CON/2
此网址将返回“'/' 应用程序中的服务器错误”。我知道我的 Action 将返回一个带有这些参数的值。
但是,如果我使用相同的路线但带有其他参数:
localhost:343434/Lev/Details/3/4/FHS/5
它将调用动作并返回结果。 “'/'应用程序中的服务器错误”仅在使用“CON”时出现
结果是这样的:
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Lev/Details/1/4/CON/2
这是我的路线:
routes.MapRoute(
"LevRoute",
"{controller}/{action}/{id}/{source}/{levtyp}/{Levid2}/{page}/{order}",
new { controller = "Lev", action = "Details", page = UrlParameter.Optional, order = UrlParameter.Optional }
);
提前感谢您的帮助!
【问题讨论】:
-
两件事:你需要得到实际的异常输出,我们需要看到你的路由。 (不过,我怀疑问题出在您的路线上)
标签: asp.net-mvc routes server-error