Creating a AuthorizeAttribute - what do I need to know?

前端 未结 3 1735
离开以前
离开以前 2020-12-28 20:44

Here are my requirements:

  • I\'ll be adding users to N amount of roles; defined in a database.

  • I need to protect each controller action with

3条回答
  •  青春惊慌失措
    2020-12-28 21:27

    You can use the default membership provider and role provider, rather than implement your own, but you will need to also use the default asp.net membership database, aspnetdb.mdf.

    See here for a walkthrough

提交回复
热议问题