| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

CET 4584 Assignment 4B - Creating a Login System

Page history last edited by PBworks 13 years, 3 months ago

 CET 4584 Assignment 4B

Creating a Login System

 

Objectives

 

Be able to create a login screen and a login default page.

 

Assignment

 

Most web systems have 2 primary front end pages - one for users NOT logged in and one for users who are logged in. From assignment 3B you should already have a page to enter users into the system. It would be a good idea to have a link to this on your login page.  For this assignment you will create 3 pages;

 

1. A default page for users not logged into your system

2. A login page (accepting username and password)

3. A default page for users logged into the system.

 

You can make your "system" have any subject, name, or theme - if you cannot think of anything simply use MyDailyMath as the name of your system (from the project). All I will be interested in - is does your system work. I will want to start on the not logged in page, navigate to the login page, login, and be transferred to the logged in default page.

 

Information

 

You will need some more stored procedures for this one. Primarily a stored procedure to verify that the login is valid. This procedure assumes that the tables and procedures from Assignment 3B were used.

 

CREATE PROCEDURE [dbo].[sp_VerifyLogin]
@UserName nvarchar(63),
@Password nvarchar(63)
 AS
 BEGIN

SELECT Count(*) FROM [User] 
WHERE UserName = @UserName
AND UserPassword = @Password

END
 

Estimated Completion Time

 

You should be able to have these written and posted within 10 hours worth of work.

 

Supporting Lectures 

 

I highly recommend (if you have not viewed these yet)

 

Programming in DOTNET Lecture I

Coding Correctly in .NET ( with sample code)

 

Here are some class examples (VB and C#) that will be helpful

 

CategoryCodeCommon Class - http://cet4429.pbworks.com/Code+-+Category+Common+Class

DatabaseCommon class - http://cet4429.pbworks.com/Code+-+Database+Common+Class

 

Questions and Answers

 

Recommended Approach

 

For assignments 3B and 4B I recommend making a class called UserManagement. This class would be a wrapper for all of the code which deals with users, such as CreateUser or ValidateUser. By having all of these methods (functions) as part of this class you will be able to easily acess them - and you can create a reusable code framework. These classes will be capable of supporting most all of the applications that you will create in the future.

 

Here is a sample start of this class: UserManagement Class Code

 

Creating this class is pretty simple in Visual Studio - you simple add a new class (call it UserManagement.aspx) by right clicking the project and using Add New, and selecting class. (In C#) the functions you create will be public static - so that you can call them by simply typing UserManagement.ValidateUser(...)

 

I recommend you NOT use the built-in ASP.NET user controls, even though I have a video on that approach. These controls will limit you in what you can do in user management - where your custom built application will not.

 

 

External Resources

 

Feel free to use all of the immense .NET resources at hand. You will also want to keep a log of all the useful sites to help you with your coding. Here is another site that I find useful  http://www.codeproject.com/

 

Grading Criteria

 

Operational login system is worth 10 points. (3 points partial credit for having the default page, 7 point for logging in and being redirected to a welcome page).

 

Comments (0)

You don't have permission to comment on this page.