Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
Hi
 
I have 8 asp.net applications running on our web server, and all applications have their own login.
I have created another asp.net 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 2:54am
Comments
Krunal R at 22-Nov-12 7:56am
   
Try it out with "Sesssion"
Anele Ngqandu at 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
good
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 asp.net 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.
<logininfo>
      <login username="EncryptedString" password="EncryptedString" sessionid="EncryptedString" rememberpassword="true/false" targetappid="2" logintime="DateTime.Now" />
      <login ...="" />
      <login ...="" />
       .....
</logininfo>
 
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 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'
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2014
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