Click here to Skip to main content
12,502,346 members (54,073 online)
Rate this:
 
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 1:54am
Comments
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
 
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
  Permalink  

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 | Mobile
Web02 | 2.8.160919.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2016
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