ASP.Net Role based access

G

Guest

Hi
I have an intranet application which would be accessed by a small group of
users. I want to create a Windows group called 'MyAppUsers' and add all these
user accounts into that group. Next I want to enable access to the
application for this group and deny access to all other users.
I have tried the following in my web.config file:
<authorization>
<allow roles="Domain\MyAppUsers"/>
<deny users ="*" />
</authorization>
It is as recommended on a Microsoft support article but it doesnt work for
me. I am using ASP.Net 2.0 with IIS 5.1. Please correct me if I am wrong on
this one. I am sure this is a very common requirement.

Thanks in advance
Vikas Manghani
 
S

S. Justin Gengo

Vikas,

You may also need to change the default role provider. Check these other
settings in the web.config:

<authentication mode="Windows" />

<roleManager defaultProvider="WindowsProvider" enabled="true"
cacheRolesInCookie="false">
<providers>
<add name="WindowsProvider"
type="System.Web.Security.WindowsTokenRoleProvider"/>
</providers>
</roleManager>

Regards,

--
S. Justin Gengo, MCP
justin@aboutfortunate[-NoSpam-].com

Free code library at:
www.aboutfortunate.com
 
G

Guest

Hi Justin
I tried that - but even though I have added myself as a user to the
MyAppUsers windows group, I am asked for my credentials. Even if I supply my
correct credentials, it does not allow me to access the application.

Thanks and regards
Vikas Manghani


S. Justin Gengo said:
Vikas,

You may also need to change the default role provider. Check these other
settings in the web.config:

<authentication mode="Windows" />

<roleManager defaultProvider="WindowsProvider" enabled="true"
cacheRolesInCookie="false">
<providers>
<add name="WindowsProvider"
type="System.Web.Security.WindowsTokenRoleProvider"/>
</providers>
</roleManager>

Regards,

--
S. Justin Gengo, MCP
justin@aboutfortunate[-NoSpam-].com

Free code library at:
www.aboutfortunate.com




Vikas Manghani said:
Hi
I have an intranet application which would be accessed by a small group of
users. I want to create a Windows group called 'MyAppUsers' and add all
these
user accounts into that group. Next I want to enable access to the
application for this group and deny access to all other users.
I have tried the following in my web.config file:
<authorization>
<allow roles="Domain\MyAppUsers"/>
<deny users ="*" />
</authorization>
It is as recommended on a Microsoft support article but it doesnt work for
me. I am using ASP.Net 2.0 with IIS 5.1. Please correct me if I am wrong
on
this one. I am sure this is a very common requirement.

Thanks in advance
Vikas Manghani
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top