1

I have a MVC c# app and I have been tasked with adding in an existing VB .NET web forms app. I have added it to the project and configured it as an application in IIS. The app works fine except I need to share data between them. An example would be that it is required that the user signs into the c# app and not have to do it again in the VB app. I also need to share the session between the two. When I configure the VB app as a Virtual Directory, I get an exception; 'System.Web.HttpUnhandledException' in System.Web.dll("").

The project is configured like here where it is says Make Multiple Visual Studio .NET Projects Participate in the Same Web Application. This is a good example of what I am trying.

I have tried everything that I can find on Google that involves running multiple projects together and running C# MVC and VB Webforms.

Is sharing the session possible? If so, what approach should I take? All help is greatly appreciated.

inosu812
  • 101
  • 2
  • 9
  • Check the solution in the link, it seems you will have to use SQL Server to store the session so both web apps could access it. http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service – MAlvarez May 06 '17 at 03:21
  • Thank you so much MAlvarez, that was exactly it. I don't know how I didn't see that after all of the hours that I spent Thursday & Friday of last week looking. Thanks again, this was a life and sanity saver. – inosu812 May 08 '17 at 20:11
  • Possible duplicate of [Sharing sessions across applications using the ASP.NET Session State Service](http://stackoverflow.com/questions/2868316/sharing-sessions-across-applications-using-the-asp-net-session-state-service) – Bugs May 08 '17 at 20:56

1 Answers1

0

After implementing what I found in the link that was posted by MAlavez above, everything is working as expected. Here's the link in case anyone missed it above. Sharing sessions across applications using the ASP.NET Session State Service

Community
  • 1
  • 1
inosu812
  • 101
  • 2
  • 9