Click here to Skip to main content
15,357,967 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi, I have an application ABC built in ASP.NEt Web forms , ABC is the parent application of all small application in my organization.

I have another application XYZ , which is a small application develomed in MVC 4

what I need to do is ,

1. when a user is logged in in ABC , he has a link in ABC "Go to XYZ" , if user click this link he is redirected to home page of XYZ without logging in.

2. If user directly want to go to XYZ the he has to provid his credentials on the login page of XYZ

3. But the session of user on ABC is different from XYZ,

4. If user logged off from XYZ , he will be still logged in in ABC if the session is not timed out

Both ABC and XYZ are on different servers but the authentication machanism is same , user credentials are validated using a WCF service which is being called by javascript.

How to achive this ??

Any useful code samlpes , links , blogs ..

what I am planning is..

The session Id of users on ABC is kept in database in session table , and XYZ has access to it. on clinking the link "Go to XYZ" a temporary GUID which is one to one related with the session id of ABC , is passed as a query string parameter for the XYZ url , this temporary GUID is expired after 10 seconds. XYZ uses this GUID to find the corresponding session ID in the ABC database, and opens the home page of XYZ if the session is found, a new session is created for the user in XYZ and session details will be saved in the local table of XYZ.

Please advice if this approach is correct..

Thanks in advance.
Posted
Updated 14-Apr-14 22:57pm
v2

1 solution

As an another option, you can use Windows Azure to build Single Sign-On apps.Please read below article to know about that.

Single Sign-On (Building Real-World Cloud Apps with Windows Azure)

Another useful link : How to Implement Single Sign On in MVC4

Good Luck ! :)
   
v2

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