|
| Web News |

Indian to head AOL's international operations Time Warner's Internet unit (America online) AOL has appointed its India chief Maneesh Dhir as its international operations head. Maneesh Dhir, 42, will be based in Bangalore, thereby becoming the latest in a string of executives to work for high-profile US IT firms from a foreign office. Earlier, Dhir was senior vice...
India nearly doubles mobile phone use in 2006 India added close to 74 million new mobile telephone subscribers last year, making it one of the most attractive markets for mobile telephone operators and wireless equipment vendors The number of wireless subscribers grew 97% from 75.94 million at the end of...
Indian Railways set to become net savvy You can travel by train in India and still remain connected with some long-distance trains set to get Wi-Fi connectivity. Premier trains like the Rajdhani Express and the Shatabdi Express and even the Jan Shatabdi Express will be the first ones to be provided with the facility, officials of the Mumbai-headquartered Western...
SCO Group Launches Company To Deliver...
It may be a pariah to Linux users in the United States, but litigious Unix developer The SCO Group apparently has friends in high places in tech-mad India. A spokesman for the company, which infamously threatened to sue Linux users after claiming in court...
Microsoft helps fight online child abuse in India Microsoft is working with the International Centre for Missing & Exploited Children (ICMEC) and the international police force Interpol to help fight online child abuse in India. The organizations are helping Indian law enforcement agencies, such as the Central Bureau of Investigation (CBI), in how to use technologies...
|
 | |
|
01.23.07 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.
Cost Effective Website and Network Monitoring IPCheck Server Monitor - Free Download |
|
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.
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.
http://www.madskristensen.dk/
|
|