Examining membership, roles and profile in ASP.NET 2.0
As end users, the number of user names and passwords we possess, not to mention forget, can be bothersome. As developers, though, membership functionality represents an important piece of a Web application. Through well-built membership profiles, administrators can collect valuable information about site visitors, be they fan club members or customers, and ensure that only the right people gain access to the administrative aspects of the site.
Though forms-based authentication automates some of this process, ASP.NET developers are responsible for defining where user information is stored and for creating log-in pages and profile management systems. Scott Mitchell, writer, consultant and founder of 4GuysFromRolla.com, has assembled a four-part tutorial on membership, roles and profiles in ASP.NET 2.0. Each chapter includes screen shots and code samples.
Part 1 covers what was added to ASP.NET 2.0 in the upgrade from ASP.NET 1.x. This primarily constitutes programmatic support and Web controls for working with user information, but there's also SqlMembershipProvider, which will store that user information on a SQL Server database.
Part 2 describes how to use SqlRoleProvider to enable and manage roles.
Part 3 explains the process of adding membership and role services to an existing database. This is done using the ASP.NET SQL Server Registration Tool.
Part 4 goes into more detail about individual user accounts -- how to notify them when log-in attempts fail, for example, and how to log those failures.
More on ASP.NET 2.0 from SearchVB.com
Reference: ASP.NET 2.0 Learning Guide
Tip: Tutorial explains ASP.NET 2.0 site navigation
Tip: Master Pages in ASP.NET 2.0 drive uniform design
This was first published in May 2006
Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.