Authentication Cookie?

A

Arpan

Using the "SetAuthCookie" method of the "FormsAuthentication" object
sets a cookie which can be used to validate users.

Now assume that a user tries to visit an ASPX page named
"Account.aspx". Before rendering the contents of "Accounts.aspx", using
the FormsAuthentication object, I want the app to first check whether a
cookie exists or not. If no, the user should be redirected to a login
page, say, "Login.aspx" & after successful validation (i.e. after
creating a cookie) should the user be redirected to "Accounts.aspx".

Is there any method of the "FormsAuthentication" object to verify
whether a cookie already exists or not?

Thanks,

Arpan
 

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

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top