Web News

Live sex assault 'Nets' Canadian
TORONTO: A man who was sexually abusing a young girl in his home was arrested after he transmitted images of the assault via the Internet to an undercover detective, the police said on Thursday.

Electronics holiday sales may be ho-hum
A fierce battle is brewing for consumer electronics dollars this holiday season as two new video game consoles join the widening mix of TVs, cameras,

Net neutrality debate arrives in Canada
The battle in the United States by major telecom companies to control web content has arrived in Canada with little fanfare — and it’s a fight that could forever change the Internet as we know it. t’s being waged...

Cutting-edge wireless internet service goes live in Moncton
Moncton residents are set to have a new citywide wireless internet service available to them on Thursday based on a new type of wireless technology. Red Ball Internet was to debut its high-speed wireless data service that uses so-called iBurst technology by Kyocera Corp. of Japan.


11.06.06


ASP.NET 2.0: XML Membership Provider

By Mads Kristensen

ASP.NET ships with a SqlMembershipProvider and a ActiveDirectoryMembershipProvider that makes user authentication and authorization very easy to implement, but for some reason those are the only membership providers provided natively by ASP.NET 2.0.

So, what do you do when you don't want or can't use SQL Server or Active Directory for memberships? You have to build a custom membership provider that suits your needs.

That's exactly what I faced when I wanted an XML membership provider for a small web project. The only one I could find on the web was a very simple read-only xml provider from MSDN. I then changed it to be writable as well, so you can dynamically add new users among other things. I also encrypted the passwords so no one is able to make sense out of them when looking at the XML file.

It's plug n' play, it works and it makes user authentication ridiculously easy. Download the code at the bottom and dump the XmlMembershipProvider.cs class into the App_Code folder and the users.xml into the App_Data folder. Then write this in the web.config.

Low Rate eCommerce & Retail Plans



Now you have a membership provider that enables you to make use of the collection of built in authentication controls. You can also interact directly with the provider without using the built in controls. Here's an example of how to create a new user:



Even though you can access the provider programmatically, nothing beats the simplicity of the built in controls. To start using the XmlMembershipProvider, drag a CreateUserWizard to your webform and let the magic begin.

Screen Shot

Download

XmlMembershipProvider.zip (3,45 KB)

About the Author:
Mads Kristensen currently works as a Senior Developer at Traceworks located in Copenhagen, Denmark. Mads graduated from Copenhagen Technical Academy with a multimedia degree in 2003, but has been a professional developer since 2000. His main focus is on ASP.NET but is responsible for Winforms, Windows- and web services in his daily work as well. A true .NET developer with great passion for the simple solution.

About DevWebProCanada
DevWebProCanada is for professional developers ... those who build and manage applications and sophisticated websites. DevWebProCanada delivers via news and expert advice New Strategies In Development.

DevWebProCanada is brought to you by:

SecurityConfig.com NetworkingFiles.com
NetworkNewz.com WebProASP.com
DatabaseProNews.com SQLProNews.com
ITcertificationNews.com SysAdminNews.com
LinuxProNews.com WirelessProNews.com
CProgrammingTrends.com ITmanagementNews.com


-- DevWebProCA is an iEntry, Inc. publication --
iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509
2006 iEntry, Inc.  All Rights Reserved  Privacy Policy  Legal 


archives | advertising info | news headlines | free newsletters | comments/feedback | submit article


Delivering IT Solutions DevWebProCanada News Archives About Us Feedback DevWebProCanada Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact