Owin Identity at Visual Studio 2013

var authenticationManager = HttpContext.Current.GetOwinContext().Authentication;

im using vs2013 and this line of code is not working

it says

Error 1 "System.Security.Principal.IPrincipal" does not contain a definition for "GetOwinContext", and there is no extension method "GetOwinContext" that takes the first argument of type "System.Security.Principal.IPrincipal" that can be found (you do not have a directive using or assembly reference?)

Class AuthenticationManagerresolves namespaceSystem.Net

+4
source share
1 answer

I just created a complete tutorial on adding this from Visual Studio 2012 to httpJunkie.com. But yes, you need Microsoft.Owin.Host.SystemWeb, and it can be found in NuGet.Org

https://www.nuget.org/packages/Microsoft.Owin.Host.SystemWeb/2.0.2

:

PM > Microsoft.Owin.Host.SystemWeb

+7

All Articles