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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With