0

I have a few web applications running on production server.

Scenario:

  1. Web App1(e.g. www.test.com): In this web application, User logs in and cookies are created in this application. User can do some other functionalities here, although on click of 1 button, it is required to redirect to another web application (WebApp2)
  2. Web App2 (on different subdomain, e.g. abc.test.com): The session created earlier is to be passed here. Hence, I had used same machine key for Web.config in two webapps (Web App1 and Web App2) (As suggested on Link: Sharing sessions across applications using the ASP.NET Session State Service).

Issue: Although, the session is getting shared fine and everything works great on staging. But, on production, I am getting this error:

Unable to cast object of type 'System.Security.Principal.GenericIdentity' to type 'System.Web.Security.FormsIdentity'

It seems to me that the session sharing is not happening for some reason on production. Can you please guide me on the possible cause of this issue.

Community
  • 1
  • 1
Varun Goel
  • 339
  • 3
  • 15

1 Answers1

0

Either: Enable Forms authentication on production IIS

or: ensure your web.config on production (sessionState)

It looks like roots are configuration issues on production.

Marcin Wachulski
  • 567
  • 4
  • 14