我有兩個處理程序。將Session中的對象保存在ashx處理程序中,並在另一個ashx處理程序中獲取該對象。怎麼樣?
在Authentication.ashx處理程序我保存對象會是這樣的:
HttpContext.Current.Session["ConnectionUserSession"] = userCache;
然後,我還有一個處理程序,Send.ashx我想保存在Authentication.ashx的對象。
我該怎麼做? 我的代碼來獲取對象是:
UserCache userCache = (UserCache) HttpContext.Current.Session["ConnectionUserSession"];
問題: userCache是空永諾,我有IRequiresSessionState兩個處理器來實現。
問題是? – usr
對不起,問題在於Send.ashx。變量userCache全爲空。我在兩個處理程序上都實現了接口IRequiresSessionState。 – mrodriguez
使用什麼客戶端技術來訪問? –