From: simonxy on 16 Mar 2010 07:31 I created a hhtpModul. If I call aspx page, it works. If I call asp page it doesn't work. I'm using OnAcquireRequestState event and I would like to check if there is active session. But I get an error that ctx.Session is null. Is there any other option to check if session is active? Maybe read sessionID from cookie and check if this ID is active on IIS server? How can I do that? Thank you for your answer. private void OnAcquireRequestState(object sender, EventArgs e) { HttpApplication app = (HttpApplication)sender; HttpContext ctx = app.Context; String hash=""; if (ctx.Session != null) { if (ctx.Session.Contents["hash"] != null) hash = ctx.Session.Contents["hash"].ToString(); } ..... ..... ctx.Session["hash"] = "hash"; } regards,Simon
|
Pages: 1 Prev: Programatically create aspx page? Next: Configure Virtual Directory as application |