Forms Authentication in ASP.NET: Configuration and Implementation, Slides of Computer Programming

An overview of forms authentication in asp.net, explaining how it differs from windows authentication, and outlining the steps to configure and implement it in a web application. Topics covered include configuring the web.config file, enabling membership, and validating users.

Typology: Slides

2012/2013

Uploaded on 09/27/2013

vikrant
vikrant 🇮🇳

4.4

(9)

119 documents

1 / 11

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASP Authentication
There are basically three authentication
modes
Windows
Passport
Forms
You choose an authentication mechanism in
the web.config file
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Forms Authentication in ASP.NET: Configuration and Implementation and more Slides Computer Programming in PDF only on Docsity!

ASP Authentication

 There are basically three authentication

modes

 Windows

 Passport

 Forms

 You choose an authentication mechanism in

the web.config file

Windows Authentication

 Here you are relying on the internal Windows

authentication services

 IIS displays an authentication dialog box

 IIS validates the user

 Page access is granted based on Access Control

Lists

 Clients must be Windows machines

 Works well on intranets and corporate network

applications

 We don‟t use these in real-world Internet applications

Configuring Forms

Authentication (1)

 It‟s configured in the

section of the Web.config file

 Set the mode attribute to “forms”

 Set the Forms key to the login URL

Web.config for Forms

Authentication

<system.web>

<system.web>

Implementing Forms

Authentication (Steps)

 Enable membership for the application and

specify the membership provider

 This is done in the section of

the web.config file

 All of this is part if the ASP infrastructure

Implementing Forms

Authentication (Steps)

<membership defaultProvider="SqlProvider"

userIsOnlineTimeWindow="15">

<add name="SqlProvider"

type="System.Web.Security.SqlMembershipProvider"

connectionStringName="MySqlConnection"

applicationName="MyApplication"

enablePasswordRetrieval="false"

enablePasswordReset="true"

requiresQuestionAndAnswer="true"

requiresUniqueEmail="true"

passwordFormat="Hashed" />

The Web Site Administration

Tool

 Use the ASP.NET Web Site Administration tool

to

 Create and manage users

 Create and manage roles

 By default, the data is stored in an SQL

Server Express database

Web Site Admin Tool

(Example)