locked
access to silverlight page only for login user RRS feed

  • Question

  • Hi.

    I have SL business app.

    When my app load and user didn't login or haven't cookies I want redirect to SL login page, but if user have cookie and auto login I want redirect to my page.

    I try do this

    public MyPage()
            {
                InitializeComponent();
                if(!WebContext.Current.User.IsAuthenticated)
                {
                    
                }
                
            }
    protected override void OnNavigatedTo(NavigationEventArgs e)
            {
                if (!WebContext.Current.User.IsAuthenticated)
                {
                    NavigationService.Navigate(new Uri("/LogIn", UriKind.Relative));
                }
                            
            }

    But I have always
    WebContext.Current.User.IsAuthenticated = false
    even if I loged in automaticaly from cookie.

    Tuesday, November 6, 2012 8:55 AM