I have a Asp.net WebAPI service that is hosted on AppHarbor which throws 404 error on POST requests. The MVC 4 controller’s POST works perfectly though that is hosted in the same virtual dir.
The same WebApi works on localhost. I tried below options with no luck:
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true" >
<remove name="WebDAVModule" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
I also tried setting up action based URL to check if that works, but no luck. I have even decorated the method with:
[AcceptVerbs("POST")]
Would there be anything that needs to be added to web.config or any authentication setting that I am missing.
Solved, it was because of a database problem. I over looked the default try..catch which was returning a
instead of a 500 error code. Its up and running now.