Soy nuevo en Silverlight y trabajo en una aplicación Silverlight alojada en mvc. El usuario iniciará sesión en la página aspx /LogOn y se le redirigirá a la aplicación Silverlight u otra vista. Para acceder al usuario registrado en Silverlight, el servicio de autenticación se agrega en mvc.autenticar en mvc y redirigir a Silverlight, cómo acceder al usuario autenticado?
App.xaml.cs modificado basado en Enable authentication in RIA services
public App()
{
this.Startup += this.Application_Startup;
this.Exit += this.Application_Exit;
this.UnhandledException += this.Application_UnhandledException;
InitializeComponent();
WebContext webcontext = new WebContext
{
Authentication = new FormsAuthentication()
};
this.ApplicationLifetimeObjects.Add(webcontext);
WebContext.Current.Authentication.LoadUser().Completed +=
(s, e) => MessageBox.Show(WebContext.Current.User.Name);
}
Este es el enfoque no funciona como buzón de mensajes se muestra como vacío