Installation and deployment
Version 7.x > Installation and deployment > WebAPI Controllers in Kentico View modes: 
User avatar
Member
Member
anshuman.shandilya-aonhewitt - 12/3/2013 10:08:12 AM
   
WebAPI Controllers in Kentico
Hi,

I have to get data from client side and render it on page. To accomplish that I created a WebAPI controller in App_Code folder of Kentico website and registered the route in CMSApplicationEvents.Start.After event. I debugged and see the route is successfully registered but when I call controller from Google Chrome Postman app, I get HTML of the master page and status as 404 (resource not found).
Is there any other setting that I need to do in web.config or elsewhere to enable WebAPI calls.

Please help.

Thanks
Anshuman

User avatar
Member
Member
anshuman.shandilya-aonhewitt - 12/3/2013 10:24:26 AM
   
RE:WebAPI Controllers in Kentico
Another pointer, that if I enter valid url of a page created in Content Tree, I get correct HTML of that page. So request authentication is out of scope now (as I was thinking earlier that the WebAPI controller request generated from postman was not authenticated by Kentico)

User avatar
Member
Member
anshuman.shandilya-aonhewitt - 12/4/2013 7:32:41 AM
   
RE:WebAPI Controllers in Kentico
I figure out the solution. I upgraded to 7.0.39 and its working now. Earlier I was trying on 7.0.27.