Click here to Skip to main content
13,090,446 members (46,309 online)
Rate this:
Please Sign up or sign in to vote.
See more:

I have 8 applications running on our web server, and all applications have their own login.
I have created another application that will provide a common interface to those 8 applications and also will have a login to enter to this system.
But if the user logout from any internal application, i want its username of outer login?

Thanks in advance.
Posted 22-Nov-12 1:54am
Krunal R 22-Nov-12 7:56am
Try it out with "Sesssion"
Anele Ngqandu 22-Nov-12 8:08am
Rethink about it and yes use sessions or get userID every time the user leaves so that you can query his or her username

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1. Have a common logout screen in outer app. From that you redirect the user to outer app's login screen.
2. Session is a heavy object. Use it wisely. The inner 8 applications might be already using Session to manage data within each application.
3. Store the logged in users info (from outside app) in an xml file. Also store the Session ID.
      <login username="EncryptedString" password="EncryptedString" sessionid="EncryptedString" rememberpassword="true/false" targetappid="2" logintime="DateTime.Now" />
      <login ...="" />
      <login ...="" />

By doing this, you can manage a lot of things.

1. You can kill the session from outside the app.
2. On logout, you just have to clear the SessionId, or you can just remove that <login> entry.
3. You can keep track of
-- no. of logged-in users to the server.
-- no. of logged-in users to any inner app.
4. If the user wishes, you can easily switch between the apps. You just have to update the 'TargetAppId'

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.170813.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100