Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

owin Identity in visual studio 2013

Tags:

identity

owin

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

im using vs2013 and this line of code isnt working

it says

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

The AuthenticationManager class resolves to System.Net namespace

like image 856
ojorma Avatar asked Mar 22 '23 19:03

ojorma


1 Answers

I just created an entire tutorial on adding this from Visual Studio 2012 at httpJunkie.com But yes, You need Microsoft.Owin.Host.SystemWeb and it can be found at NuGet.Org

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

Or installed via package Manager Console:

PM> Install-Package Microsoft.Owin.Host.SystemWeb

like image 87
Eric Bishard Avatar answered May 04 '23 15:05

Eric Bishard