Hello Pls help me... I am new in asp.net..
I used IRequiresSessionState in handler and getting null value in UserId,for this i used this line in my httphandler
string UserId = Context.Session["UserID"].ToString();
and for it used cookieless="false" in web.config file..
If i used here cookieless="true" then getting value of UserId.... but getting Url is like,
localhost:6669/testfinal/(S(my0zd01urh10m2fcidguefwz))/Profile.aspx
So pls help me for solving my problems..... I want session id in handler as well as not getting url like this...
i need url without sessionid...
Blocked AccountPosted Nov 9, 2012, 5:05 AM
try assigning your session like this
HttpContext.Current.Session["UserId"]="SomeValue";
after that you can directly access session value in your handle by using this:
HttpContext.Current.Session["UserId"]
Only thing you need to remember that you must implement the IRequiresSessionState
interface.
try this and let me know.
Thanks