c# datamatrix barcode The PasswordRecovery Control in Visual C#.NET

Print Data Matrix 2d barcode in Visual C#.NET The PasswordRecovery Control

The PasswordRecovery Control
Encoding Data Matrix 2d Barcode In Visual C#
Using Barcode encoder for .NET Control to generate, create Data Matrix ECC200 image in .NET applications.
www.OnBarcode.com
Recognize Data Matrix ECC200 In C#.NET
Using Barcode reader for Visual Studio .NET Control to read, scan read, scan image in .NET framework applications.
www.OnBarcode.com
When you establish a membership provider to work in conjunction with your ASP .NET 2.0 web application, one option you have is to enable password recovery (which is the case if you are using the default membership provider). Assuming this is the case, you can use the PasswordRecovery control to allow the user to obtain her stored password based on her username, password question, and password answer. To illustrate assume you have a user stored in the project s mdf file that matches the credentials in Table 5-9: Table 5-9. Properties of the PasswordRecovery control
Print EAN / UCC - 13 In C#.NET
Using Barcode creation for .NET Control to generate, create UCC-128 image in .NET framework applications.
www.OnBarcode.com
Painting PDF-417 2d Barcode In C#.NET
Using Barcode creator for Visual Studio .NET Control to generate, create PDF 417 image in VS .NET applications.
www.OnBarcode.com
Control Property
Code128 Printer In Visual C#
Using Barcode encoder for VS .NET Control to generate, create Code-128 image in .NET framework applications.
www.OnBarcode.com
Barcode Creation In Visual C#
Using Barcode generation for .NET Control to generate, create Barcode image in Visual Studio .NET applications.
www.OnBarcode.com
Username Password Email Password Question Password Answer
Encode Matrix Barcode In Visual C#.NET
Using Barcode printer for VS .NET Control to generate, create Matrix 2D Barcode image in .NET applications.
www.OnBarcode.com
ITF-14 Generator In C#.NET
Using Barcode generator for .NET framework Control to generate, create EAN - 14 image in .NET framework applications.
www.OnBarcode.com
Assigned Value
ECC200 Printer In None
Using Barcode creator for Office Word Control to generate, create Data Matrix image in Microsoft Word applications.
www.OnBarcode.com
DataMatrix Recognizer In None
Using Barcode decoder for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Chucky chu@k123!! chucky@myprovider.com What is your favorite NBA team Timberwolves
Data Matrix Generation In Visual Studio .NET
Using Barcode maker for Reporting Service Control to generate, create ECC200 image in Reporting Service applications.
www.OnBarcode.com
Generate Barcode In VS .NET
Using Barcode generator for Reporting Service Control to generate, create Barcode image in Reporting Service applications.
www.OnBarcode.com
Now assume your default.aspx file has been updated with a PasswordRecovery control. Beyond updating the initial UI with a desired look and feel, the only additional requirement is to set the details of the MailDefinition element. This segment of the <asp:PasswordRecovery> scope enables you to configure the properties of the e-mail that will be sent upon successful recovery. This brings up a very important point: By default the PasswordRecovery control will use the SMTP mail server on the local Web server (using the default SMTP port of 25). This information is recorded within the <smtpMail> element of the machine.config file. If these default settings do not fit the bill, you are free to add a custom <smtpMail> element within a web.config file; for example:
Generating Barcode In .NET
Using Barcode maker for ASP.NET Control to generate, create Barcode image in ASP.NET applications.
www.OnBarcode.com
Denso QR Bar Code Printer In Visual Studio .NET
Using Barcode drawer for ASP.NET Control to generate, create QR image in ASP.NET applications.
www.OnBarcode.com
CHAPTER 5 .NET 2.0 SECURITY
Decode Code 3 Of 9 In None
Using Barcode recognizer for Software Control to read, scan read, scan image in Software applications.
www.OnBarcode.com
Print Barcode In Java
Using Barcode generator for Eclipse BIRT Control to generate, create Barcode image in BIRT applications.
www.OnBarcode.com
<system.web> <smtpMail serverName="MySmtpServer" serverPort="15" from="me@here.com"> <fields> <add name="smtpauthenticate" value="2"> </fields> </smtpMail> </system.web> All this being said, here is one possible PasswordRecovery declaration: <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" BackColor="#F7F6F3" BorderColor="#E6E2D8" BorderPadding="4" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em"> <MailDefinition From="admin@mySite.com" Subject="Here is your e-mail"> </MailDefinition> <InstructionTextStyle Font-Italic="True" ForeColor="Black" /> <SuccessTextStyle Font-Bold="True" ForeColor="#5D7B9D" /> <TextBoxStyle Font-Size="0.8em" /> <TitleTextStyle BackColor="#5D7B9D" Font-Bold="True" Font-Size="0.9em" ForeColor="White" /> <SubmitButtonStyle BackColor="#FFFBFF" BorderColor="#CCCCCC" BorderStyle="Solid" BorderWidth="1px" Font-Names="Verdana" Font-Size="0.8em" ForeColor="#284775" /> </asp:PasswordRecovery> Now, when the user first encounters the PasswordRecovery control, he is prompted for his current username (see Figure 5-18).
Scanning PDF-417 2d Barcode In Visual Studio .NET
Using Barcode scanner for VS .NET Control to read, scan read, scan image in Visual Studio .NET applications.
www.OnBarcode.com
QR Printer In None
Using Barcode drawer for Office Word Control to generate, create QR Code image in Microsoft Word applications.
www.OnBarcode.com
Figure 5-18. Providing the username to the PasswordRecovery control
EAN-13 Creation In Visual Basic .NET
Using Barcode generation for .NET Control to generate, create GTIN - 13 image in Visual Studio .NET applications.
www.OnBarcode.com
USS Code 128 Creation In Objective-C
Using Barcode encoder for iPhone Control to generate, create Code 128A image in iPhone applications.
www.OnBarcode.com
CHAPTER 5 .NET 2.0 SECURITY
Once the user clicks on the Submit button, the membership provider retrieves the stored password question, which is rendered back into the HTTP response stream (see Figure 5-19).
Figure 5-19. Requesting an answer . . . If you supply the correct answer (which is to say, the supplied answer matches what is currently maintained in the mdf file), the current user will be e-mailed his current password. If not, an expected error message is displayed within the PasswordRecovery control.
The ChangePassword Control
Changing a password is also extremely simple to do via the ChangePassword control. As you might guess by this point, this widget will perform all of the heavy lifting of updating the underlying data store maintained by the membership provider. Assume the following <asp:ChangePassword> declaration using the default UI: <asp:ChangePassword ID="ChangePassword1" runat="server"> </asp:ChangePassword> With this, the end user would find the following page (see Figure 5-20). Of course, if the supplied and stored passwords match, the underlying data source is updated with the new password value.
The CreateUserWizard Control
Earlier in this chapter you learned how to programmatically create a new user via the CreateUser method of the Membership type. As you have seen, a MembershipUser instance consists of numerous possible points of data beyond a simple username/password (e-mail, password retrieval question/answer, etc). If you were to add a new CreateUserWizard control onto a page designer, you would find that the initial UI addresses each of these core issues. As expected, this out-of-the-box implementation will automatically insert a new user into the data store maintained by the designated membership provider.
CHAPTER 5 .NET 2.0 SECURITY
Figure 5-20. The ChangePassword control Like other Web-centric Wizards provided by ASP .NET 2.0, the CreateUserWizard control can be updated with additional steps that address any application-specific user data. We ll allow the interested reader to dig into the details if you so choose; however, as you can see in Figure 5-21, the page designer provides hyperlinks that launch the process of adding additional pages (via Add/Remove WizardSteps ).
Copyright © OnBarcode.com . All rights reserved.