Last active
February 22, 2019 06:44
-
-
Save ShineSmile/b4a58d36bda572d662100e1091423907 to your computer and use it in GitHub Desktop.
ASP.NET Controller register
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
One thing I ran into was having my configurations registered in the wrong order in my GLobal.asax file for instance: | |
Right Order: | |
AreaRegistration.RegisterAllAreas(); | |
WebApiConfig.Register(GlobalConfiguration.Configuration); | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
Wrong Order: | |
AreaRegistration.RegisterAllAreas(); | |
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
WebApiConfig.Register(GlobalConfiguration.Configuration); | |
Just saying, this was my problem and changing the order is obvious, but sometimes overlooked and can cause much frustration. | |
https://stackoverflow.com/questions/15556035/all-asp-net-web-api-controllers-return-404 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment