For the reasons that are not important to the question, I would like to know how to make my controllers / routing work in ASP.NET MVC5 if my controller class names do not end in Controller
as per convention? Do I need to manually register them somewhere?
Asked
Active
Viewed 1,568 times
0

Erik Philips
- 53,428
- 11
- 128
- 150

Fit Dev
- 3,413
- 3
- 30
- 54
-
1http://stackoverflow.com/questions/3011482/change-controller-name-convention-in-asp-net-mvc/30577420 – serhiyb Jan 30 '17 at 16:48
-
1http://stackoverflow.com/a/11557783/1529657 – Rahul Singh Jan 30 '17 at 16:49
1 Answers
4
The Controller
suffix is baked into the the ControllerDescriptor
and ControllerTypeCache
classes making it hard to override. One way that comes to mind is to write a custom controller factory and override the GetControllerType
method.

Nkosi
- 235,767
- 35
- 427
- 472

Darin Dimitrov
- 1,023,142
- 271
- 3,287
- 2,928