Web API 2 data source

David Pearson asked on June 30, 2017 20:39

Can Kentico 10 consume a web api call with authentication in the header to a external source server?

I know I can hardcode this in the App_Code folder then set up a custom data source control to feed the data to a Kentico web part, is there a better way?

Thanks David

Recent Answers

David Pearson answered on July 7, 2017 14:59

Ended up creating a repository class (calls the web service) that returns the data to the Custom Data Source with a Data Source web part. Then I added custom filter to allow filtering of that data. It all works, just trying to stay in the Sandbox... As for authentication, will keep those values in Kentico Admin section.

Another neat thing I found was the Geo API in CMS.WebAnalytics.AnalyticsContext.CurrentGeoLocatio

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.