Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

443
Vistas
Session variables getting lost when navigating to a different controller (& AJAX requests), however session vars set during Session_Start is intact

This question is about an issue we are facing with a .net framework based MVC app that uses windows authentication. The variables set during Session_Start seems to be just fine and available throughout, but any session variable set after the fact seems to be lost. In the output below, first line is where we set a session variable. The exception is when I am trying to access it in a different page. However if you notice other session variables set during Session_Start are still available. This is issue 1.

Current session value (home): zero
---
(different page)
System.NullReferenceException: Object reference not set to an instance of an object.
   at ---removed---
   at ---removed---
Id (from session): 0
Name (from session): Admin
Email (from session): admin@admin.com

We explored further and it also seems like AJAX requests are creating a whole new session. This is issue 2. We have tried a number of things - update the $.ajax call to xhrfields/withCrdentials, tried setting an AutoRedirectMode using the FriendlyUrls package, tried ignoring a few routes suggested, etc. But nothing helps. So any pointers regarding this would be appreciated.

Thanks!

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

We found the issue. Looks like some process (most likely the anti-virus) is messing with the bin directory causing the application to be restarted again and again. So we added the fcnMode attribute to the httpRuntime element and set it to Disabled so as to disable the behavior for now.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda