Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Comments
[no name] 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

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.
XML
<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 <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'
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900