473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ASP.Net Role based access

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

Jul 27 '07 #1
2 3336
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" <Vi***********@discussions.microsoft.comwrote in message
news:68**********************************@microsof t.com...
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
Jul 27 '07 #2
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" wrote:
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" <Vi***********@discussions.microsoft.comwrote in message
news:68**********************************@microsof t.com...
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

Jul 27 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Murray | last post by:
I am trying to develop a web based database application to manage a Scout group. I need to control the level of access different visitors to the site are allowed to different parts of the...
3
by: craig | last post by:
I am working on my first .NET development project that involves custom role-based security per the project requirements. This lead to a general design issue this week that really caused us some...
2
by: Jesper Stocholm | last post by:
I have implemented role-based security within my ASP.Net application. However, it seems the role is not passed to the authentication ticket I create. I want to use it to display/hide some...
3
by: Mike Logan | last post by:
Questions about Role Based Security in ASP.Net: I have a few questions about role based security in an ASP.Net application. Below are some points about our system: - We have a hierarchical...
5
by: Snig | last post by:
Hi all I need to implement the following scenario in my application: 1. Roles are stored in SQL-SERVER. 2. Access Rights will be given to the roles by the administrator by the application...
8
by: Mark White | last post by:
Hey everyone I'm having a great deal of problems finding this information through google and yahoo, so I turn to you on this. I have a Windows app running on XP. I am able to caputre the...
7
by: nugget | last post by:
Role-based security for an ASP/ASP.NET mixed environment Hello: My co-worker and I have been charged with designing role-based security for our intranet. The technologies we have to work with...
5
by: Lewis Perin | last post by:
Is anyone aware of robust software, suited to a preexisting PHP application, that handles permissions for various types of requests by role rather than user ID? I'm speaking of maintaining/editing...
1
by: JohnC | last post by:
I'm in the concept stage of putting together a web application. Certain featues will be available only if the person has been given access. This is based on their particular subscription. I can...
3
by: RedHair | last post by:
I use the Form Authentication and Role base security to secure one ASP.NET 3.5 appication. Below are security settings in web.config <location path="testAdmin.aspx"> <system.web>...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.