Питер, лучше, чтобы вы централизовали доступ к сеансу.
public class SessionStateBag
{
private static string SessionPropertyXKey = "SessionPropertyX";
public static int SessionPropertyX
{
get { return Session[SessionPropertyXKey]; }
set { Session[SessionPropertyXKey] = value; }
}
private static string SessionPropertyYKey = "SessionPropertyY";
public static string SessionPropertyY
{
get { return Session[SessionPropertyYKey]; }
set { Session[SessionPropertyYKey] = value; }
}
// etc. Try to guess the type of the session property. If you cannot guess it; use object.
}
В остальной части кода замените Session ["xxx"] одним из приведенных выше свойств SessionStateBag.
Это может занять у вас день или два, но у вас будет доступ ко всем сеансам в одном месте, и у вас будет возможность увидеть лабиринт, который иногда создает объект Session.