404 Error When Trying To Hit WebAPI
Search
404 Error When Trying To Hit WebAPI
The problem: You get a 404 error when trying to hit the WebAPI via http://localhost/webapi/v1.5/ClubSpeedCache/Clear
The fix:
In c:\clubspeed\wwwroot\WebAPI\Web.config, add the following between the <modules></modules> tags:
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0" type="System.Web.Routing.UrlRoutingModule" preCondition="" />
Save your changes. No IIS or server restart is necessary.
This ensures that the necessary routing module is in place for the WebAPI application.