Solved

For an internet website is it still okay to use forms authentication with cookies?

Posted on 2008-10-15
3
238 Views
Last Modified: 2013-11-26
I am maintaining some code from a visual studio 2003 .net 1.1 application. It appears to be using Forms Authentication with cookies. Is this method of using forms authentication with cookies still a valid way of doing web page authorization and authentication? here is an example of some of the code:

                  FormsAuthentication.SignOut();
                  Request.Cookies.Clear();
0
Comment
Question by:brgdotnet
3 Comments
 
LVL 5

Expert Comment

by:varungd
ID: 22728147
Try this code...
WebConfig
 

<authentication mode="Forms">

			<forms loginUrl="~/Security/Login.aspx"

				   protection="All"

				   defaultUrl="~/Common/ePanel_Default.aspx" 

				   timeout="30"

				   />

		</authentication>
 

		<authorization>

			<deny users="?" />

		</authorization>
 
 

Button click in login page
 

FormsAuthentication.RedirectFromLoginPage(txtLoginName.Text, false);
 
 

For signout
 

 FormsAuthentication.SignOut();

 Session.Abandon();

 Request.Cookies.Clear();

Open in new window

0
 
LVL 13

Accepted Solution

by:
TechTiger007 earned 130 total points
ID: 22729376
Yes forms authentication and cookies is still a valid way of authentication over internet.

0
 
LVL 2

Author Closing Comment

by:brgdotnet
ID: 31506609
Brief
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now