Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

ASP.Net Role based access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vikas Manghani - 27 Jul 2007 14:04 GMT
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. Justin Gengo - 27 Jul 2007 14:21 GMT
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,

Signature

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

Free code library at:
www.aboutfortunate.com

> Hi
> I have an intranet application which would be accessed by a small group of
[quoted text clipped - 14 lines]
> Thanks in advance
> Vikas Manghani
Vikas Manghani - 27 Jul 2007 14:44 GMT
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

> Vikas,
>
[quoted text clipped - 31 lines]
> > Thanks in advance
> > Vikas Manghani

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.