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

Benefits and limitations of using hidden frames, What are benefits and limi...

What are benefits and limitations of using Hidden frames 1)    The benefits of using hidden frames are as follows: 2)    More than one data field can cache. 3)    The abi

C# program, Write a program interactively two integers using the method con...

Write a program interactively two integers using the method console.readline and int.parse and display their sum

Interface, What is a Interface? The Interface is a contract that descri...

What is a Interface? The Interface is a contract that describes the signature of the functionality. So when a class is implementing a interface it says to the outer world, that

Program of custom console output - c# program, Program of Custom Console Ou...

Program of Custom Console Output - C# Program Hello guys i need your advice. How can i implement the custom console output in my project. Please recommend some examples.

Dynamic web presentation tier, Part 1 requires you to complete a dynamic we...

Part 1 requires you to complete a dynamic web presentation tier, based on your MiddlewareLib.dll  library. This should run as an ASP.NET page, Default.aspx, under WebDev.WebServer,

Describe the eventlog class, Describe the EventLog class. The EventLog ...

Describe the EventLog class. The EventLog class is used to access the Windows event logs from Windows services. Using EventLog, you can also customize Windows event logs that r

Define network, Define Network? A network is a set of devices linked by...

Define Network? A network is a set of devices linked by physical media links. A network is recursively is a connection of two or more nodes by a physical link or two or more

3cx pbx sync windows service, Project Description:  You require access t...

Project Description:  You require access to a commercial version of the 3CX PBX system in order to be able to program the API You need sufficient technical knowledge about PB

Write a program of console statements - c# program, Write a program of cons...

Write a program of console statements - C# Program I am unable to make out the use of console statements in C# language. Can anyone suggest me any example for this.

Full time contractual programming position, Project Description: This is...

Project Description: This is a full time contractual role seeking for a sports advisory service. We are data insights consultancy specializing in sports. We consult to a number

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