– ‘System.Web.HttpContext’ does not contain a definition for ‘GetOwinContext’

I have the following error :'System.Web.HttpContext' does not contain a definition for 'GetOwinContext'
whenever I debug my project. this error is in the web API page, although it doesn't show an error in the default AccounController.cs and the nuget package is installed.what is missing?

using IdentitySample.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
using System.Web;
using System.Threading.Tasks;
using task.Models;
using System.Globalization;
public ApplicationUserManager UserManager
            return _userManager ?? HttpContext.GetOwinContext().GetUserManager<ApplicationUserManager>();

        private set
            _userManager = value;

Best Solution

ok I found the solution since I already installed the nuget package all I have to do is the following:

  return _userManager ?? HttpContext.**current**.GetOwinContext().GetUserManager<ApplicationUserManager>();