Salve a tutti,
gestisco l'ingresso in area riservata usando delle variabili di sessione per riconoscere l'utente loggato. Dopo aver acceduto alla pagina protetta però, se la sessione mi scade mi viene restituito questo errore:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 24: User = Session("User").ToString
Come faccio a "prevenire" la scadenza di una Session? Cioè a fare un redirect ad una pagina di avviso quando la Sessione è scaduta?
Grazie a tutti.
Igor