'The resource cannot be found' - error for 1 specific controller asp.net mvc
I've been pulling my hair out on this one.
I have a controller: ChatController of which any route I try gives me a 'The resource cannot be found' error.
The route:
routes.MapRoute(
"chatPage",
"{lang}/chat/{action}",
new { lang = "th", controller = "Chat", action = "Index" }
);
The url: /th/chat
All my other routes (to other controllers) work fine.
I use routedebug.dll to see if my routes are set up correcty and the route is correct.
Even if I delete the whole ChatController, I still get the same error. That means it does find the route but doesn't even get to the controller (usually this will give an controller not found error or something similar)
I get this on development server and IIS.
Anyone?
* Update *
I got it working by changing the routevalue from {lang}/Chat to {lang}/chat and changed my controllername accordingly (ChatController => chatController), this works开发者_JS百科... for now. Still want to know what causes this.
make sure that previous routes don't match this case. comment all others routes and then try. in my computer it's works for me :)
精彩评论