Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'System.Web.HttpContextBase' does not contain a definition for 'GetOwinContext'

Tags:

private IAuthenticationManager AuthenticationManager {     get     {         return HttpContext.GetOwinContext().Authentication;     } } 

I get the error :

'System.Web.HttpContextBase' does not contain a definition for 'GetOwinContext' and no extension method 'GetOwinContext' accepting a first argument of type 'System.Web.HttpContextBase' could be found (are you missing a using directive or an assembly reference?)

What might be wrong?

like image 336
Sooner Avatar asked Oct 05 '14 05:10

Sooner


1 Answers

It seems you have missing NuGet package called 'Microsoft.Owin.Host.SystemWeb'. Install package from NuGet or use package manager console to install the package.

Install-Package Microsoft.Owin.Host.SystemWeb

Hope this helps.

like image 87
DSR Avatar answered Sep 23 '22 09:09

DSR