简体   繁体   中英

Visual Studio MVC C# and VB Web Forms in Same Solution Sharing Session

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM