DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Sat, 30 Jun 2007 17:05:32 -0700,    posted on: microsoft.public.dotnet.framework.aspnet.security        back       

Thread Index
  1    GaryDean am
          2    (Steven Cheng[MSFT])


coding Access Rules   
I've built a basic authentication system using all of the login controls and 
a custom screen to manage roles using the Membership, MembershipUser, and 
Roles classes.  So now I can manage users and roles from the website.  But, 
what classes are available to manage access rules (permissions)?  do we have 
to write code to manipulate the individual web.configs?

-- 
Regards,
Gary Blakely
Date:Sat, 30 Jun 2007 17:05:32 -0700   Author:  

RE: coding Access Rules   
Hi Gary,

From your description, you're building a custom web management application 
which can help user configure the membership user & role info of the 
application. Currently, you're wondering how to add the "access 
rule"(authorization) management into the system, correct?

As for the "access rules", it is actually persisted as <authorization> 
setting in application's web.config file, so if you want to provide service 
to programmatically manage this setting, you need to also programmatically 
change the web.config file. In .net framework 2.0, you can utilize the 
configuration API to do this.  And the "<authorization> section is 
associated with the System.Web.Configuratrion.AuthorizationSection class. 

#AuthorizationSection Class
http://msdn2.microsoft.com/en-us/library/system.web.configuration.authorizat
ionsection.aspx

You can use code to open the configuration object of the specified path in 
your application and then locate the "AuthorizationSection" and manage 
rules in it.

Hope this helps.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
 	

This posting is provided "AS IS" with no warranties, and confers no rights.
Date:Mon, 02 Jul 2007 04:48:11 GMT   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us