Using Visual Studio 2013 Express MVC application with references to MVC 5.2 Asp.Net.Identity.Core 2.0
inside any controller or from anywhere else in my application the method GetUserId() does not seem to exist and I can not for the life of my understand how that could be. I was under the impression it was a method included in Asp.Net Identity 2x. What might I be missing here?
It is an extension method. Reference the name space at the top of the class.
using Microsoft.AspNet.Identity;
Since 2015 RC1 the GetUserId extension method is in the System.Security.Claims namespace.
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