Home   Preview the Book   Chapter 15, TOC   Part 23

  Previous: Localizing Graphic Effects
  Next: Getting the User Name from an Identity Object

Personalizing Web Pages

We mentioned at the beginning of this chapter that the VB Snippets case study uses registration for personalization rather than for security. Therefore, VB Snippets does not force the visitors to receive a login page before gaining access to the site. To support this approach, the Web.config file contains the following entries:

<authentication mode="Forms" />
<authorization>
    <allow users="*" /> <!-- Allow all users -->
</authorization>

This combination of entries provides for free access to the Web site, but it makes forms authentication available for registered visitors. The CVisitor class, which we present shortly, contains the code that authenticates the user. As we saw earlier, the breadcrumbs custom control tests the Page.User.Identity.IsAuthenticated property to determine whether to output a logout or login link. Let’s look at an example that makes more use of the Page.User.Identity class.

  Previous: Localizing Graphic Effects
  Next: Getting the User Name from an Identity Object

Home   Preview the Book   Chapter 15, TOC   Part 23

Copyright © 1996 - 2017 SoftMedia Artisans, Inc. All Rights Reserved.