I don't know exactly how to explain it, but here is basically how my problem could be reproduced:
My.User.CurrentPrincipal = New GenericPrincipal( _
New GenericIdentity("username"), Nothing)
Dim authenticated = My.User.CurrentPrincipal.IsAuthenticated
MessageBox.Show(authenticated) 'True'
Dim authenticated = My.User.CurrentPrincipal.IsAuthenticated
MessageBox.Show(authenticated) 'False'
UPDATE: I reported a bug at: http://connect.microsoft.com/WPF/feedback/ViewFeedback.aspx?FeedbackID=513731, please vote or post a workaround, and update me when you do so, thanks in advance.
Any workarounds will be welcommed!
I was hoping to find a definitive explanation for this behavior, but no such luck (yet). I do think I can offer you a work-around, though, which is to assign the custom principal object via AppDomain.SetThreadPrincipal (typically AppDomain.**CurrentDomain.**SetThreadPrincipal).
EDIT:
It turns out someone brought up this issue on the MSDN Forums. The discussion thread documents the work-around I already referenced, along with an explanation of the behavior.