私は2人のハンドラーを持っています。
Authentication.ashx Handler で、次のようにセッションにオブジェクトを保存します。
HttpContext.Current.Session["ConnectionUserSession"] = userCache;
次に、別のハンドラー Send.ashx があり、Authentication.ashx に保存されたオブジェクトを取得したいと考えています。
どうすればいいですか?オブジェクトを取得するための私のコードは次のとおりです。
UserCache userCache = (UserCache) HttpContext.Current.Session["ConnectionUserSession"];
問題: userCache は常に null であり、IRequiresSessionState が両方のハンドラーに実装されています。