Server Error in '/' Application. with same route
I've been trying to figure this out but can't find any answers to my problem. The problem I am having is with this url:
localhost:343434/Lev/Details/1/4/CON/2
This url will return a "Server Error in '/' Application". I know that my Action will return a value with theese parameters.
However, if I use the same route but with other parameters:
localhost:343434/Lev/Details/3/4/FHS/5
It will call the action and return the result. The "Server Error in '/' Application" only appears when using "CON"
The outpus is this:
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
开发者_如何学运维
And this is my route:
routes.MapRoute(
"LevRoute",
"{controller}/{action}/{id}/{source}/{levtyp}/{Levid2}/{page}/{order}",
new { controller = "Lev", action = "Details", page = UrlParameter.Optional, order = UrlParameter.Optional }
);
Thanks for help in advance!
I've found a solution for my problem by adding this to my Web.config:
<configuration>
<system.web>
<httpRuntime relaxedUrlToFileSystemMapping="true"/>
</system.web>
</configuration>
You can use Route Debugger to debug routes
精彩评论