Related Links

Question about Roles and AD

In my MVC application, I'm using local AD to authenticate users which is working fine. Now I want to create Roles like Admin and Super Admin. Can someone give me an idea how can I accomplish this. Can I use Identity? Do I need ApplicationUserManager since
I'm not going to store AD password in the database?

Re: Question about Roles and AD

joegreen2005

In my MVC application, I'm using local AD to authenticate users which is working fine. Now I want to create Roles like Admin and Super Admin. Can someone give me an idea how can I accomplish this. Can I use Identity? Do I need ApplicationUserManager since
I'm not going to store AD password in the database?

As far as I know, windows AD has its own user role.

If you enable the windows auth in the MVC application, you could directly use its role.

Re: Question about Roles and AD

When I try to run application, I get following error. What does it mean?

The following errors occurred while attempting to load the app.
- The OwinStartup attribute discovered in assembly 'gbr' referencing startup type 'ADLogin_template.App_Start.AuthConfig' conflicts with the attribute in assembly 'gbr' referencing startup type 'gbr.Startup' because they have the same FriendlyName ''. Remove
or rename one of the attributes, or reference the desired type directly.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.