Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

State management interview questions part 2

State management interview questions part 2

11.  What is Query string?

A query string is information that is appended to the end of a page URL.

Example:
http://www.localhost.com/Address.aspx?name=nagnath &lastName=kendre

12.  What is application state?

Application state is a global storage mechanism that is accessible from all pages in the Web application. Thus, application state is useful for storing information that needs to be maintained between server round trips and between requests for pages.

13.  What is Session state?

ASP.NET allows you to save values by using session state — which is an instance of the HttpSessionState class — for each active Web-application session.

14.  What is Profile Properties?

ASP.NET provides a feature called profile properties, which allows you to store user-specific data. This feature is similar to session state, except that the profile data is not lost when a user's session expires. The profile-properties feature uses an ASP.NET profile, which is stored in a persistent format and associated with an individual user.

15.  What is Session?

As we know, HTTP is a stateless protocol; it can't hold client information on a page. Session provides a facility to store information on server memory. It can support any type of object to store along with our own custom objects. For every client, session data is stored separately, which means session data is stored on a per client basis.

16.  What are Advantages and disadvantages of Session?

Advantages:

1. It helps maintain user state and data all over the application.
2. It is easy to implement and we can store any kind of object.
3. Stores client data separately.
4. Session is secure and transparent from the user.

Disadvantages:

1. Performance overhead in case of large volumes of data/user, because session data is stored in server memory.
2. Overhead involved in serializing and de-serializing session data, because in the case of StateServer and SQLServer session modes, we need to serialize the objects before storing them.

 

17. Explain in detail Session state modes?

Session state supports three modes:

1.  InProc

2.  State Server

3.  SQL Server

InProc Mode

1. This mode stores the session data in the ASP.NET worker process.
2. This is the fastest among all of the storage modes.
3. This mode effects performance if the amount of data to be stored is large.
4. If ASP.NET worker process recycles or application domain restarts, the session state will be lost.

State Server mode

1. In this mode, the session state is serialized and stored in memory in a separate process.
2. State Server can be maintained on a different system.
3. State Server mode involves overhead since it requires serialization and de-serialization of objects.
4. State Server mode is slower than InProc mode as this stores data in an external process.

SQL Server Mode

In this storage mode, the Session data is serialized and stored in a database table in the SQL Server database.

1. This is reliable and secures storage of a session state.
2. This mode can be used in the web farms.
3. It involves overhead in serialization and de-serialization of the objects.
4. SQL Server is more secure than the InProc or the State server mode.

 

18. What is Session Identifier?

Definition:

Session Identifier is used to identify session; it uses SessionID property to identify session.

Explanation:

When a page is requested, browser sends a cookie with a session identifier. This identifier is used by the web server to determine if it belongs to an existing session. If not, a Session ID (120 - bit string) is generated by the web server and sent along with the response.

 

19.  What do you understand by StateServer(Out-Proc) mode?

1. StateServer session mode is also called Out-Proc session mode.
2. StateServer uses a stand-alone Windows Service which is independent of IIS and can also be run on a separate server. This session state is totally managed by aspnet_state.exe.
3. This server may run on the same system, but it's outside of the main application domain where your web application is running. This means if you restart your ASP.NET process, your session data will still be alive

 

20.  Under StateServer(Out-Proc) mode the session state is managed by?>

aspnet_state.exe

< >

Invalid entry,please enter valid data.

Loading