Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
what is difference bbetween Sessionstatebehaviour.default and Sessionstatebehaviour.required, both have read/write access? And why sessionstatebehaviour.readonly allowing me to write value into session as below without any error

SQL
[SessionState(SessionStateBehavior.ReadOnly)]
  public class TestController : Controller
  {
      //
      // GET: /Test/

      public ActionResult Index()
      {
          Session["vd"] = "cs";
Posted
Comments
Mathew Soji 9-Jul-15 12:12pm    
SessionStateBehavior only tells ASP.NET what locks to put on the Session.

Have a look @
http://stackoverflow.com/questions/12263086/controller-sessionstatebehavior-is-readonly-and-i-can-update-session-variable

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900