0

I have a main project which is developed in asp forms where users authenticate and through Context.User.Identity I share the session with the other systems.

My problem is that I have a new project done in ASP.NET MVC and I can not share the session like the others.

Is there any way to use Context.User.Identity to get the session from my main ASP project that is not MVC?

  • When you say "session" - are you talking about ASP.Net Session state or something else? It is unclear how you were using `Context.User.Identity` to share before and what changed now (as that part of the ASP.Net stack is the same between WebForms and MVC) – Alexei Levenkov Apr 02 '18 at 17:33
  • For example, after a user authenticates from my main project, and accesses a different project, the only thing I do is that in the load event I check if the person has a session and then authenticate it in the other system Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Try .... user= Context.User.Identity.Name.ToString.Trim ... Catch ex As Exception End Try End Sub – Emerson Francisco Cartagena Ca Apr 02 '18 at 17:43
  • Can you show the error text? – MCoder Apr 02 '18 at 20:55
  • I'm still not sure what you mean, but maybe https://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service will help. – Alexei Levenkov Apr 03 '18 at 16:22

0 Answers0