I have an asp.net web form application running in integrated mode v4.0.
I tried adding apicontroller to the App_Code folder.
In Global.asax, I added the following code
RouteTable.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{id}", defaults: new { id = System.Web.Http.RouteParameter.Optional } );
When I tried to go to the controller in http://localhost/api/Value , I get a 404 error.
A URL without an extension is configured in the handler section. I have forms and anonymous authentication for a website.
ExtensionLess extension URL configured for '*.'
When I click the URL for the controller, the request is processed by StaticHandler instead of ExtensionlessUrlHandler-Integrated-4.0.
Now I have no idea why the system will throw an error, as shown in the figure below. 
Suneel Dixit Dec 16 '13 at 22:01 2013-12-16 22:01
source share