0

On Windows Server 2012 IIS 8 - After working out the web.config settings to get a ASP.Net 4.5 child web app to run within a parent ASP.Net 3.5 app, they now have the same session ID and get the cookies OK, yet the child's Session has no keys.

Seems Like the session is not shared between the two application pools.

Any ideas of how to work around this? BTW - rather difficult to modify the parent web app... So trying to only change the child app

To clarify - child web app - simply a sub folder within the parent web structure with:

  • separate IIS Application set up with Application pool of .Net 4.5
  • separate Web.config
NBO
  • 103
  • 5

1 Answers1

1

OK After digging further found this is not possible as the SessionState is not compatible between versions, see: Migrating web farm to runtime version 4 of asp.net while maintaining session

But we have found an interesting workaround since the .Net 3.5 version was using Forms based authentication we can have the "child" .Net 4.5 apply the same using the web config setting:

<machineKey compatibilityMode="Framework20SP2" ... />

And get the authenticated username from:

HttpContext.Current.User.Identity.Name

Community
  • 1
  • 1
NBO
  • 103
  • 5