My SL app use windowes authentication.
When app started, Following code add user info to colloection:
public App()
{
InitializeComponent();
// Create a WebContext and add it to the ApplicationLifetimeObjects
// collection. This will then be available as WebContext.Current.
WebContext webContext = new WebContext();
webContext.Authentication = new WindowsAuthentication() { DomainContext = new AMSRIAServices.Web.AuthenticationContext() };
this.ApplicationLifetimeObjects.Add(webContext);
}
Then in any code-behind of user control, I want to get back the user info. I tried to use WebContext.Current.User, but I get nothing. How to get user info from Application.Current.ApplicationLifetimeObjects in code?