Go to DotNetFunda.com

Community Resources



Recommend an Articles | Recommended Articles | Search Resources | Community Home |

Add and remove users dynamically Web.config

Author: kjell.ek | Posted on: 1/24/2010 12:05:27 PM | Views: 46
How do I delete a user I added dynamically from a web application? If i want to delete user/string "<allow users="peter" />"

I can add a user like this (below), but not delete a user....
Dim config As Configuration = WebConfigurationManager.OpenWebConfiguration("~", Nothing, "admin", "") Dim section As AuthorizationSection = CType(config.GetSection("system.web/authorization"), AuthorizationSection) Dim rule As New AuthorizationRule(AuthorizationRuleAction.Allow) rule.Users.Add(tbUser.Text) section.Rules.Add(rule) config.Save()
 
... Go to the complete details ...


Found interesting? Add this to:

| More


Advertisement

About Us | The Team | Advertise | Contact Us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 9/3/2010 3:51:52 AM