Visual Basic.NET
  Home arrow Visual Basic.NET arrow Page 2 - Personalization Using Visual Basic 2005
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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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

Personalization Using Visual Basic 2005
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 7
    2006-11-16

    Table of Contents:
  • Personalization Using Visual Basic 2005
  • Creating the User Through IIS
  • Creating Accounts Programatically
  • Creating the Welcome Page
  • Create a Login Page
  • Adding a Password Reminder

  • 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


    Personalization Using Visual Basic 2005 - Creating the User Through IIS


    (Page 2 of 6 )

    As an alternative to using the WAT, you can work through IIS to create the same effect.

    To begin, create an new empty directory calledFormsBasedSecurityIIS.

    In IIS manager (accessed through the control panel), create a virtual directory namedFormsBasedSecurityIIS, as shown in Figure 12-4.


    Figure 12-4.  Creating virtual directory

    Give the new virtual directory the alias “FormsBasedSecurityIIS” and on the second step of the wizard, browse to the physicalFormsBasedSecurityIIS folder you just created. After the virtual directory is created, click Properties.

    In the Properties window, click on the ASP.NET tab, and then click Edit Configuration. Within the Configuration settings dialog, click on the Authentication tab. Within that tab, set the Authentication mode toForms, as shown in Figure 12-5. Confirm that the Membership provider class is set toAspNetSqlMembershipProvider.


    Figure 12-5.  Set Authentication mode to Forms

    Click OK to close all the dialogs. A Web.config file is created for you in theFormsBasedSecurityIISdirectory, as shown in Example 12-1.

    Example 12-1. Web.config file generated

    <?xml version="1.0" encoding="utf-8"?> <configuration xmlns="http://schemas.microsoft.com/
    .NetConfiguration/v2.0">
        <system.web>
           <authentication mode="Forms" /> 
        </system.web>
    </configuration>

    ASP.NET 2.0 Forms-built security is built on a set of tables that must be created in your database: typically SQL Server or SQL Server Express. Fortunately, ASP.NET provides a utility named aspnet_regsql.exe, located in the <Drive:>\Windows\ Microsoft.NET\Framework\<versionNumber> folder on your web server, which sets up the tables for you. This utility program will create the required database and all its tables.

    The easiest way to use this utility is to run aspnet_regsql.exe from the .NET command box, with no arguments. A wizard will walk you through the process. For more details, see the MSDN article “Installing the SQL Server Provider Database.”

    You are now ready to create a new web site in the same location. A dialog box will warn you that you already have a web site in that location; choose Open Existing Site, as shown in Figure 12-6.


    Figure 12-6.  Open existing site

    This instructs Visual Studio to use the site you’ve created, complete with the Web. config file already available for that site.

    More Visual Basic.NET Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Programming Visual Basic 2005," published...
     

    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

    - User-defined Functions using Visual Basic Ap...
    - Understanding Object Binding in VBA
    - Mastering the Message Box
    - Testing a Windows Forms Application
    - Using Visual Basic.NET Features to Code a Wi...
    - Correcting Code in a Windows Forms Applicati...
    - Write Readable Code and Comments for Windows...
    - How to Code and Test a Windows Forms Applica...
    - Adding Features to a Windows Forms Applicati...
    - How to Design a Windows Forms Application
    - LINQ to XML Programming Using Visual Basic.N...
    - Understanding Delegates using Visual Basic.N...
    - Create a Sudoku Puzzle Generator using VB.NET
    - Entity Creation and Messaging in a VB.NET Te...
    - Movement and Player Statistics in a VB.NET T...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek