Hello, all
I have a problem that is very similar to " GenericPrincipal error when logged in" which was posted on 6 June 2006 - that application was Windows, mine is ASP.
In ASP.NET 1.1, I am setting the AppDomainPrincipalPolicy.UnauthenticatedPrincipal then setting the AppDomain.SetThreadPrincipal to my Custom Principal successfully.
Then i set the Thread.CurrentPrincipal to my Custom Principal successfully.
From there, any postback causes both the Thread.CurrentPrincipal and the AppDomain thread principal to revert to an empty GenericPrincipal!! Not too big a deal on a page post since I do some page initializations and can reset it there. But I find that even a DataGrid button column click is causing the reversion to an empty GenericPrincipal.
Can anyone please help me get a clue as to what is going on here? Why won't my AppDomain and Thread maintain my CustomPrincipal??
tnx
Fio
Got it. I haven't had a chance to try an implementation of this Global event in my application as yet, but I can see that this will solve my issue.
thanks so much.
Rocky, I can never thank you enough for all you've taught me thru your several iterations of "Expert Business Objects". Your books have become my bible - I never leave home without them.
THANKS!
Overridding Principal in:
protected void Application_PostAuthenticateRequest(object sender, EventArgs e)
Instead of
protected void Application_AuthenticateRequest(object sender, EventArgs e)
In Global.asax.cs worked for me in an ASP web application
Copyright (c) Marimer LLC