با سلام
راستش من خودم اون تاپیک رو به عنوان تکراری گزارش کردم .
آقای راد هم به من اعتماد کردند و تاپیک رو پاک کردند.
چون فکر کردم تکراری است . ولی ظاهرا حق با شماست . و در HttpHandler ها دسترسی به session ها کمی سخت است :
The SessionState is handled by an HttpHandler, and it's possible that your
HttpHandler is called before the SessionState HttpHandler.
By implents the IRequiresSessionState (marker interface), you prevent your
HttpHandler to be called before the SessionState HttpHanlder, and so you can
use the session.
And if you only require read only session state, you implement IReadOnlySessionState
instead of IRequireSessionState.
ببینید این کد کمکی میکنه ؟
http://www.netnewsgroups.net/group/m...opic27233.aspx
و یا این لینک ها:
http://aspadvice.com/blogs/ssmith/ar...tpHandler.aspx
http://weblogs.asp.net/ashicmahtab/a...tphandler.aspx
در واقع باید چنین صورتی رو پیاده کنید :
class MyHttpHandler : IHttpHandler, IReadOnlySessionState // or IRequireSessionState if you want write access
{
public void ProcessRequest(HttpContext context)
{
string s = context.Session["SomeSessionVariable"];
}
public bools IsReusable { get { return true; } }
}
اگر موفق نشدید فکر کنم باید به فکر Cache یا Application باشید .
موفق باشید . خدانگهدار