Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 4 - Adding Roles to ASP.NET Accounts
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Actuate Whitepapers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
VISUAL BASIC.NET

Adding Roles to ASP.NET Accounts
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 3 stars3 stars3 stars3 stars3 stars / 9
    2006-11-22

    Table of Contents:
  • Adding Roles to ASP.NET Accounts
  • Restricting Access to Pages Based on Roles
  • Create Personalized Web Sites
  • Exploring the Pro

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Adding Roles to ASP.NET Accounts - Exploring the Pro


    (Page 4 of 4 )

    Stop the application and open the Database Explorer window, and look at the Tables in the aspnetdb database. Open two tables, aspnet_Users (which lists all the users your database knows about) and aspnet_Profile (which lists the profile information for those users). To see these next to each other, click and drag the tab for one of the views, as shown in Figure 12-34.


    Figure 12-34.  Drag tab

    When you let go, a menu will open offering to create a new tab group. Choose New Horizontal Tab Group, as shown in Figure 12-35.


    Figure 12-35.  Create New Horizontal Tab Group

    This done, you can see both the Profile tab and the Users tab in a single window. The Users tab shows you that each user has a uniqueUserID. The Profile tab has a foreign key added into that table (UserID) and lists thePropertyNames andPropertyValues, as shown in Figure 12-36.


    Figure 12-36.  Profile tables

    PropertyNamesmatches up with the entries you created in the<profile>section of Web.config:

      <profile>
        
    <properties>
            
    <add name="lastName" />
            
    <add name="firstName" />
            
    <add name="phoneNumber" />
            
    <add name="birthDate" type="System.DateTime"/> 
         
    </properties>
      </profile>

    Each property is named (e.g.,phoneNumber), given a type (Sfor string), a starting offset (phoneNumberbegins at offset5), and a length (phoneNumber’s value has a length of12). This offset and value are used to find the value within thePropertyValueStringfield.

    Notice thatbirthDateis listed as a string, that begins at offset 17 and is 95 characters long; if you look at thepropertyValuesStringcolumn, you’ll find that the birthDate is encoded as XML.

    Please check back next week for the continuation of this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · This article is an excerpt from the book "Programming Visual Basic 2005," published...
       · This code has helped a lot! Only thing is I'm getting an error that some of the...
       · I read this article because I was looking for a way to add membership to my website....
       · This excerpted article should explain the term "WAT." I don't know WAT that means. ...
     

    Buy this book now. This article is excerpted from chapter 12 of the book Programming Visual Basic 2005, written by Jesse Liberty (O'Reilly, 2005; ISBN: 0596009496). Check it out today at your favorite bookstore. Buy this book now.

    VISUAL BASIC.NET ARTICLES

    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...
    - Creating and Drawing a Game Map in VB.NET
    - Working with Classes and Properties for Game...
    - Working with Loops, Arrays, and Collections ...
    - Learning Loops in VB.NET for Game Development
    - Learning VB.NET: Working with Variables, Con...
    - The Basics of VB.NET Through Text Game Devel...
    - Learning VB.NET Through Text Game Development
    - Types of Operators in Visual Basic
    - Operators
    - Understanding Custom Events using Visual Bas...
    - Polymorphism using Abstract Classes in Visua...
    - Shadowing using Shadows in Visual Basic.NET ...
    - Overloading and Overriding in Visual Basic.N...




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway