Session application viewstate

Session application viewstate

Basic questions / ans. for beginners

1. What is session?

Ans. Session is the period of time since user request hits the server to session end.
        Data stored in session would only be available for that sesion.
 
**Note by closing Browser at client side dosen't mean that session is ended. 
   Session gets end when there is no user activity 
   since last hit by the user to server and default time set for session to end.

2. How to maintain Session?

Ans. To store session data ASP.net technology comes with inproc and out proc model
        in Proc: session data gets stored inside same process of web application. During recycling of web application web application    
        would loose all users session. 

        out proc: Session data can be stored out of the process using ASP State server or MS SQL server.
                      Application will get benifit of multiple worker process and those processes will use shared session.
                     You need to mark classess whose objects participate into session as serializable attribute. as your objects are crossing the boundaries of process.

3. What is View state ?

Ans. View state is hidden control which holds the Values of Controls during page Post back. Those values are specific to Page only.
       Can't persist across the application or session.

4. What is Application ?
Ans. Application object: Data stored using these type of object can be conumed by entire web.

It is an error to use a section registered as allowDefinition3dMachineToApplication beyond application level This error can be caused by a virtual directory not being configured as an application in IISSessions In AspnetIRequiresSessionState and sessionApplication Pool and Worker processSession Loss In WebgardenHow are you using session variables in Asp.net with C#.netBest Android Applicationssession objectsAsp.net SessionAsp.net Interview Questions for 2 years or 3 years experianceAsp.net Session Timeout

Author

My name is Satalaj, but people call me Sat. Here is my homepage: . I live in Pune, PN and work as a Software Engineer. I'm former MVP in ASP.net year 2010.
Disclaimer: Views or opinion expressed here are my personal research and it has nothing to do with my employer. You are free to use the code, ideas/hints in your projects. However, you should not copy and paste my original content to other web sites. Feel free to copy or extend the code.
If you want to fight with me, this website is not for you.
 

I'm Satalaj.