//all my code to check that this user should access my web site
.CurrentPrincipal = new GenericPrincipal(new GenericIdentity(currentUser.ID.ToString()), currentUser.Roles);
//here Thread.CurrentPrincipal.Identity.IsAuthenticated is actually set to true but for some reason
//I can't understand this value set to true is not kept along the session
Unfortunately my test Thread.CurrentPrincipal.Identity.IsAuthenticated always returns false
so the whole check is done many times during one single session.
Here is my web.config regarding authentication :
forms loginUrl="/form/Verifid.asp" name="Login"></forms>
Note that the login is done on an asp page so not in the dotnet project.
Should that work...?
Any idea about what can be wrong?
I can't find detailed documentation about Thread.CurrentPrincipal.Identity.IsAuthenticated ...: how is this property set to true, which is the link to GenericPrincipal et GenericIdentity, I'm a bit lost with what I could read about the subject... all explanation would be warmly welcome...
Beside this does "FormsAuthentication" correctly work while authentication is done on an asp page "external" to the dotnet project ....
Thanks for your help,
Tuesday, August 28, 2007 3:03 PM
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.