Does Forms Authentication require cookies?

P

Peter Rilling

I am creating a website that uses Forms Authentication. From what I have
read, FA uses cookies to store the authentication ticket once logged in. My
customer would also like this site to not require cookies. Does FA require
the use of cookies or can I use some other mechanism when I set the system
to use cookieless sessions?
 
R

Richard

You could use a session variable instead? Redirect the user to the log
on page when the variable is not set. On valid logon set the sesssion
varriable.

When you pages load just check for the variable, rather than cookies.
 
S

Stephen Barrett

The direct answer to your question is if you want to use the FA built in
system, then a cookie is required. As others have mentioned you can work
around it by using a session variable, but that isn't really using FA.

You would have to make sure all your pages inherit from a base class to
where you can check your session var, or put code in each page (yuck), or
write your own http handler to that could do the check. Of course, none of
these methods are using FA.
 
B

Brock Allen

Sessions use cookies as well to track the user, so this still doesn't meet
the requirement.

ASP.NET 2.0 supports cookieless FormsAuthentication, and in fact it can AutoDetect
user-by-user if they have disabled cookies.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top