Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Windows authentication mode in ASP.Net Core

$
0
0

Hi All,

Am doing intranet site development, so wanna allow user based on their access right.

I Have some user Group

  • Admin: All access page
  • Viewer: Only view access page
  • Editable: Able to update data.

ASP.Net MVC (web.config)

<authentication mode="Windows"/>

Controller/Action

[Authorize(Role = "Admin, Viewer,Editable")]
public IActionResult Index()
{
  return View()
}
[Authorize(Role = "Admin, Editable")]
public IActionResult UpdateCustomer()
{
  return View()
}

When the user opens the site, it usually gets logged user and user group matched with action filter, then it allows content to access.

how to do in ASP.Net Core?

Thanks


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>