asp.net web api - Webapi and Sessions -
i trying add sessionstate existing asp.net application. have added
httpcontext.current.setsessionstatebehavior(sessionstatebehavior.required)
to global.asax file each time make call api, new session created.
here how trying view session
var session = httpcontext.current.session; if (session != null) { if (session["testsession"] == null) { session["testsession"] = "session exists" } return "testsession: " + session["testsession"]; } return ("no session");
just wondering if else has encountered problem, using session state sqldatabase store session
Comments
Post a Comment