1

I currently moving a project from Web Forms to MVC. I encountered on probably simple problem, but I stopped for a while so I need a suggestion so I can move on. I use Identity to authenticate user. But logging is based on user and other data, let's say university. User can be member of different university so unique is: user + university combination. My problem is that I need this data over http context because existing library use it. So now I can:

string UserName = HttpContext.User.Identity.Name;

What I need is to have:

string University = HttpContext.User.Identity.University;

I want to avoid using:

Session["University"] = "MIT";

Because of security reasons. So is there other alternative?

Erik Philips
  • 53,428
  • 11
  • 128
  • 150
Adam Stepniak
  • 815
  • 6
  • 21
  • I do not believe this is a duplicate, he is asking for extending AspUsers Table Directly, the answer linked is to AspUser `Claims` which is different – Transformer Feb 28 '17 at 06:37

0 Answers0