Forms authentication, DOT NET Programming

Assignment Help:

Explain Forms authentication in detail.

In the old ASP if you were said to create a login page and do authentication you have to do lot of custom coding. But now in ASP.NET that is made easy by introducing Forms authentication. So let's view in detail what form authentication is.

The Forms authentication uses a ticket cookie to see that user is authenticated or not. That means that whenever  user is authenticated first time a cookie is set to tell that this user is authenticated.When  the cookies expire then Forms authentication mechanism sends the user to the login page.

The steps which define steps for Forms authentication are as follows:-

1) Configure Web.config file with forms authentication. As shown below in the config file you can see we have give the cookie name and loginurl page.

path="/" />

Remove the anonymous to access to the IIS web application, some changes are

Done to web.config file are as follows.

1) Create the login page which will accept the user information. You will have to create your login page that is the Login.aspx which will actually get the user data.

2) Finally a little bit coding in the login button.

Let's assume that the login page has2 textboxes: Txtname and txtapssword.

Also import the System.Web.Security and put the following code in the login button of the page.

If  Page.IsValid Then

If  FormsAuthentication.Authenticate(txtName.Text, txtPassword.Text) Then

FormsAuthentication.RedirectFromLoginPage(txtName.Text, False) Else

lblStatus.Text = "Error not proper user" End If

End If


Related Discussions:- Forms authentication

Program of reversing array - c# program, Program of Reversing Array - C# Pr...

Program of Reversing Array - C# Program Please provide me assignment help regarding my problem.

What is garbage collection, What is garbage collection? Explain the di...

What is garbage collection? Explain the difference among garbage collections in .NET 4.0 and earlier versions. Garbage collection stops memory leaks during execution of pro

Ewdedewdew, ssasadsdsdsddewdewdwedewdewdewededewdewdewdewdewdewdewdwedssa s...

ssasadsdsdsddewdewdwedewdewdewededewdewdewdewdewdewdewdwedssa sdedwdew dedewdew ewdewdew ewdewdew dedew ewdew ewd ewde ew ew

Different transaction levels in sql server, What are different transaction ...

What are different transaction levels in SQL SERVER? The Transaction Isolation level decides how is the one process isolated from theother process. Using the transaction levels

Sequence of uml diagrams in project, What is the sequence of UML diagrams i...

What is the sequence of UML diagrams in project? At First let me say some fact about this question, you cannot implement all the nine diagrams given by the UML in one project;

Why project needed xml?, Explain why your project needed XML. Remember ...

Explain why your project needed XML. Remember XML was meant to exchange data between the two entities as you can define your user friendly tags with ease. In the real world sce

Work with me on different coding using visual studio, Work on different cod...

Work on different coding using visual studio 2012/2013 writing Java script as well as C# codes. Project Description: I want to shift to new Programming Env. and I would like

Implementing page fragment caching, How will you implement Page Fragment Ca...

How will you implement Page Fragment Caching? The Page fragment caching includes the caching of a fragment of the page, rather than the whole page. When the parts of the page a

CSS, Howto create a simple stylesheet for a web application

Howto create a simple stylesheet for a web application

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd