WEB API Setting in kentico10

arbab anis asked on July 12, 2017 08:07

at the time of doing web api2 setting as mentioned in documentation of kentico 10 i am unable to use using System.Net.Http; using System.Web.Http; it showing assembly reference is not there in library project.

Correct Answer

Mariia Zhokh answered on July 12, 2017 10:01

You should add reference to those in your project. You should install Microsoft.AspNet.WebApi.Core package https://www.nuget.org/packages/Microsoft.AspNet.WebApi.Core/ and you will be able to use using System.Web.Http; For System.Net.Http try to add reference to that lib by clicking right mouse button on Reference folder -> Add reference. https://stackoverflow.com/questions/9611316/system-net-http-missing-from-namespace-using-net-4-5

2 votesVote for this answer Unmark Correct answer

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