Re: how to update context.user without postback ...ing
- From: "Softlion" <newsgroups@xxxxxxxxxxxx>
- Date: Sat, 9 Feb 2008 15:53:53 +0100
From FormsAuthenticationModule.cs source code line 140 :
////////////////////////////////////////////////////////////
// Step 6: Create a user object for the ticket
e.Context.SetPrincipalNoDemand(new GenericPrincipal(new
FormsIdentity(ticket2), new String[0]));
SetPrincipalNoDemand is a non public function,
and Context.User is read only ....
Any other idea ?
--
____________________
http://www.softlion.com/
Web tools and games
"Dominick Baier" <dbaier@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> a écrit dans
le message de news: 8e6a913a1bcf38ca393aad7cce20@xxxxxxxxxxxxxxxxxxxxx
Context.User gets populated after the postback by the formsauthentication
module. If you don't need a postback -set Context.User yourself.
Source code is available. As all the ASP.NET code is. Just google.
-----
Dominick Baier (http://www.leastprivilege.com)
Developing More Secure Microsoft ASP.NET 2.0 Applications
(http://www.microsoft.com/mspress/books/9989.asp)
Hi,
I'm using form authentication in a user control with fires an
onSignedOn
event to registered page controls,
so there is no need to postback a second time to reflect changes.
It seems the Context.User.Identity stays a GenericIdentity object even
after calling FormsAuthentication.SetAuthCookie, and there is no
method in the FormsAuthentication class to do that.
Is the source code for FormsAuthentication class available ? Any
workaround without postbacking ?
Thanks.
___________________
http://www.softlion.com/
Web tools and games
.
- References:
- how to update context.user without postback ...ing
- From: Softlion
- Re: how to update context.user without postback ...ing
- From: Dominick Baier
- how to update context.user without postback ...ing
- Prev by Date: Re: how to update context.user without postback ...ing
- Next by Date: Re: how to update context.user without postback ...ing
- Previous by thread: Re: how to update context.user without postback ...ing
- Next by thread: Re: how to update context.user without postback ...ing
- Index(es):
Relevant Pages
|
|