How to use the IsAuthenticated property?

G

Guest

Sounds like a very simple question, and maybe really is, but here it goes.

I'm being using Forms Authentication for some time now, and everything is
cool, the question that I have is that I want to ALWAYS have my HttpContext
set with a FormsIdentity (within the GenericPrincipal) no matter if the
customer did the sing-in or not, but use the IsAuthenticate property to
control the access to some areas on my site. The reason I'm asking is
because, it appears to me that just by instantiating a FormsIdentity object
the IsAuthenticated property is set to TRUE internally so I don't have
opportunity to control that property (is read only). Am I interpreting wrong
this flag? Is not intended for me to use it in the way I want to use it? I
can work around my problem using a custom flag and put it on the user data of
the ticket, but it'll be nice not to do that for something that appears to be
there already. How should I do it?

Thanks in advance
 

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,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top