Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
3 years, 3 months ago
This question already has answers here:
2 years ago.
We have Sitecore 9.0 update 2 site running on Windows Server 2016. We've added a custom web api controller. We are able to successfully request the custom web api methods on our local environment and the CD environments, but are getting 404 errors on the DEV standalone environment and all CM environments.
Has anyone else experienced/resolved this issue?
Dec 5, 2019 at 1:56
Add below patch file to allow controller:
Dec 5, 2019 at 7:42
Swati Gupta Swati Gupta
2,328 1 1 gold badge 13 13 silver badges 35 35 bronze badges
Thanks everyone for your replies. I was able to resolve this problem thanks to the answer given here:
WebAPI Controllers not being found in Sitecore 8.2
Per Ben Lipson:
Web API is apparently really aggressive when it caches API Controller types. I was able to fix my issue by doing the following:
kill the w3wps
Files\root and obliterate anything in this folder
Dec 9, 2019 at 20:36
Just to know:
404 error means that application cann`t find corresponding
route to process your request by some reasons.
It is easy to check all registered routes in any place in code by:
var registeredRoutesData = RouteTable.Routes.GetRouteData(new HttpContextWrapper(HttpContext.Current));
(The most common reasons: some config files with route initializers are missing on specific environment or otherwise - environment has its own extra configs that overwrite needed routes).
May 8, 2020 at 11:42
3,100 10 10 silver badges 30 30 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only
Sitecore.Mvc.Pipelines.Loader.InitializeRoutes)? Have you verified that the necessary configurations are deployed correctly on the CMs.