Share session value between two application

0
I want to implement SSO funtionality for my multiple applications with ADFS cradential. Identity provider project is implement as mvc project and Service provider project is implement as simple web form application(not mvc). I am trying to share sessions between two web applications, both hosted on the same server. My requirement is once user is authenticated by identity provider directly login into the all service provider without asking login for service provider and getting user identity using System.Web.HttpContext.Current.Session["UserIdentity"]), I have successfully done user authentication by identity provider with adfs credential(adfs user identity stored in System.Web.HttpContext.Current.Session["UserIdentity"]), Now i am stuck at The UserIdentity is being posted but the session does not seem to get loaded in the Service Provider project(implemented as simple web form application), i.e. System.Web.HttpContext.Current.Session["UserIdentity"]) is null. Can what I am trying to do be done? Both apps have their session set up like this: Whenever i have set sessionState in Idp web.config file then gettting below error. ![Unable to serialize the session state][1] [1]: https://lh3.googleusercontent.com/-guYj83E5FO8/WmCJGN2DO-I/AAAAAAAAAjU/bQfZJDTXCZIVhngK4e3jtH1iBUqjh3FeACL0BGAYYCw/h728/2018-01-18.png so, please guide how to share session between two web applications.
edited 1/18/2018 6:47:48 PM
asked 1/18/2018 6:39:24 PM
add a comment

1 Answers

0
It clearly states that "`UserIdentity`" object is not serialize-able. Dont serialize that one, just serialize User name/ID and on the other server retrive your user object based on that info.
 
answered 1/19/2018 12:19:04 AM
add a comment

Your Answer

Not the answer you're looking for? Browse other questions tagged smtp or ask your own question.