Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8460415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:36:03+00:00 2026-06-10T13:36:03+00:00

I have some session management code in a silverlight application. As part of that

  • 0

I have some session management code in a silverlight application. As part of that session management, I automatically log the user out if they are idle too long. When the user logs in again, any ChildWindow that was open in the previous session will still be open. All other session data is reset though, so the ChildWindow is effectively orphaned. Any attempt to work with it will throw errors. How can I kill any ChildWindows when I do the logout?

How can I find any child window that may exist, and kill it so the logout can work correctly? My first thought is to start looking along the lines of this.GetVisualDescendants().OfType<ChildWindow>(); from the shell. However, in testing, this was empty even when I had a childwindow open.

The app is a silvelight C# app using Prism & MEF.

Edit – adding more detail / another way to phrase the question:

So the program flow would be something like:

  1. User Logs in to the silverlight Appliction.
  2. User navigates around in the app and opens a ChildWindow.
  3. User abandons their computer to refill coffee and ends up in a 20 minute conversation.
  4. User’s Silverlight “session” times out. All user-specific information is discarded and the login window (another ChildWindow) is shown.
  5. User returns to computer and sees a login prompt, logs in.
  6. User sees the ChildWindow they opened just before heading out for coffee.
  7. User tries to click on something in the ChildWindow and gets an error, since all the context that the ChildWindow had was thrown away when their “session” ended.

I’d like to add to my session timeout code (or even post-login code), something that finds any open ChildWindow and closes it, in order to prevent this situation that leads to the error.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T13:36:05+00:00Added an answer on June 10, 2026 at 1:36 pm

    So, I apparently stumped everyone, or more likely didn’t make my question interesting enough.

    I did find a way to solve this though. I created a custom base class for all child windows in the application. In that base class, the ChildWindows register/unregister (in Loaded/Unloaded event handlers) themselves from a static list that can be used to get a reference to any active ChildWindows.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some code that gets the current logged in user. userID = request.session.get(_auth_user_id)
I have an application that uses coldfusion's session management (instead of the J2EE) session
I have some code that will change the background color of a specific label
I have an ASP.NET web application that takes user input across several forms. Sort
We have a WebSphere Application Server 6.1. Session management is configured with replication and
I am developing a web application, in which I have used session management to
Right now in Spring security I have this code: <session-management> <concurrency-control max-sessions=1 error-if-maximum-exceeded=true />
I have a PHP application that relies on session variables quite a lot. After
I have some (php) code that performs critical updates on an InnoDB table. I'm
I am trying to implement some proper NHibernate session management in my console application,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.