locked
Asp.net MVC Form Authentication vs. Session vs. Identity RRS feed

  • Question

  • User-47589850 posted

    Hi all,

    I have a question for login and roles management. 

    Which should i use? While writing webforms, I was checking the session on the master page. MVC is quite different.

    Thanks

    Wednesday, July 1, 2020 8:58 PM

Answers

  • User475983607 posted

    I have a question for login and roles management. 

    Which should i use? While writing webforms, I was checking the session on the master page. MVC is quite different.

    Use Identity.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 1, 2020 9:17 PM
  • User1686398519 posted

    Hi asp.netlearning,

    If you want to use "Forms Authentication" and implement role management, please refer to this link.

    If you want to use "Identity" and implement role management, please refer to this link.

    Best Regards,

    YihuiSun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 2, 2020 3:35 AM

All replies

  • User475983607 posted

    I have a question for login and roles management. 

    Which should i use? While writing webforms, I was checking the session on the master page. MVC is quite different.

    Use Identity.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 1, 2020 9:17 PM
  • User-47589850 posted

    Okey but why :) 

    Identity seems much more complicated. It is used only for login. Can you give an example?

    Wednesday, July 1, 2020 10:57 PM
  • User1686398519 posted

    Hi asp.netlearning,

    If you want to use "Forms Authentication" and implement role management, please refer to this link.

    If you want to use "Identity" and implement role management, please refer to this link.

    Best Regards,

    YihuiSun

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, July 2, 2020 3:35 AM