Inz Group

Inz Group

  • 1.7k
  • 38
  • 728

How to password protect folder with AspNet.Identity in webform

Dec 9 2022 5:25 PM

I have to updated asp.net webform application to using Microsoft.AspNet.Identity at this point i am stuck at two points

  1. How to protect folder (example admin) with Microsoft.AspNet.Identity
  2. How can i add roles to Microsoft.AspNet.Identity

I have spend hours looking for article or videos most of the either point to MVC or ASP.Net Core, while i want to use this in ASP.Net webform application with .Net Framework 4.8.

Any pointer or working example would be great.

I would appreciate example of also how to add role and use role in asp.net webform application.

In simple old asp.net membership we use to protect folder in web.config but i am not sure how to do same in Microsoft.AspNet.Identity as i have not used this in past.