4
I created a web service REST using Web Api 2, and in development everything is functional. I am using a small variation of the default route:
config.Routes.MapHttpRoute(
name: "DefaultApi",
routeTemplate: "api/{controller}/{numProtocolo}",
defaults: new { numProtocolo = RouteParameter.Optional }
);
However, when the application is created in production on IIS (version 7, Windows 2008 32-bit Server) and run in production, it returns 404 for routes that are valid:
It is worth taking into account that when the parameter
runAllManagedModulesForAllRequests
is connected, ALL requests are passed through the pipeline of ALL modules - static files including (.js, .html, etc.) In certain situations this may result in a substantial loss of performance on the site as a whole.– OnoSendai