walkinsindia.com
 
 
 
 
 
No Registration! No Resume Posting!!
 
Receive FREE Email Alerts on Current Walk-in Interviews in India, and Apply Directly to The Employer of Your Choice! - Enter your Email ID and Subscribe Right Now!

                  

 
     
 
DotNet Caching
What are the modes of storing ASP.NET session?
InProc: In this mode session state is stored in the memory space of the Aspnet_wp.exe process. This is the default setting. If the IIS reboots or web application restarts then session state is lost.

StateServer : In this mode session state is serialized and stored in a separate process (Aspnet_state.exe) therefore, the state can be stored on a separate computer(a state server).

SQL SERVER : In this mode session state is serialized and stored in a SQL server database.

Session state can be specified in element of application configuration file. Using state server and SQL SERVER session state can be shared across web farms but note this comes at speed cost as ASP.NET needs to serialize and deserialize data over network again and again.
Is Session_End event supported in all session modes?
Session_End event occurs only in "Inproc mode". "State Server" and "SQL SERVER" do not have Session_End event.
What are the precautions you will take in order that StateServer Mode work properly?
Following are the things to remember so that StateServer Mode works properly :

StateServer mode session data is stored in a different process so you must ensure that your objects are serializable.

elements in Web.config should be identical across all servers. So this ensures that encryption format is same across all computers

IIS metabase (\LM\W3SVC\2) must be identical across all servers in that farm.
What are the precautions you will take in order that SQLSERVER Mode work properly?
Following are the things to remember so that SQLSERVER Mode works properly :

SQLSERVER mode session data is stored in a different process so you must ensure that your objects are serializable.

IIS metabase (\LM\W3SVC\2) must be identical across all servers in that farm.

By default session objects are stored in "Tempdb", you can configure it store outside "TempDB" by running Microsoft provided SQL script.
What are the other ways you can maintain state?
Other than session variables you can use the following technique to store state :

Hidden fields
View state
Hidden frames
Cookies
Query strings
What are benefits and Limitation of using Hidden fields?
Following are the benefits of using Hidden fields :

They are simple to implement.
As data is cached on client side they work with Web Farms.
All browsers support hidden field.
No server resources are required.

Following are limitations of Hidden field :

They can be tampered creating a security hole.
Page performance decreases if you store large data,as the data are stored in pages itself.
Hidden fields do not support rich structures as HTML hidden fields are only single valued. Then you have to work around with delimiters etc to handle complex structures.
What is ViewState?
Viewstate is a built-in structure for automatically retaining values amongst the multiple requests for the same page. The viewstate is internally maintained as a hidden field on the page but is hashed, providing greater security than developer-implemented hidden fields do.
Does the performance for viewstate vary according to User controls ?
Performance of viewstate varies depending on the type of server control to which it is applied. Label,TextBox,CheckBox,RadioButton, and HyperLink are server controls that perform well with ViewState. DropDownList,ListBox,DataGrid and DataList suffer from poor performance because of their size and the large amounts of data making roundtrips to the server.
What are benefits and Limitation of using Viewstate for state management?
Following are the benefits of using Viewstate :

No server resources are required because state is in a structure in the page code.
simplicity.
States are retained automatically.
The values in view state are hashed, compressed, and encoded, thus representing a higher state of security than hidden fields.
View state is good for caching data in Web frame configurations because the data is cached on the client.

Following are limitations of Viewstate :

Page loading and posting performance decreases when large values are are stored because view state is stored in the page.
Although view state stores data in a hashed format, it can still be tampered because it is stored in a hidden field on the page. The information in the hidden field can also be seen if the page output source is viewed directly, creating a potential security risk.
What are benefits and limitations of using Hidden frames?
Following are the benefits of using hidden frames:

you can cache more than one data field.
The ability to cache and access data items stored in different hidden forms.
The ability to access JScript variable values stored in different frames if they come from the same site.

Following are limitations of hidden frames :

Hidden frames are not supported on all browsers.
Hidden frames data can be tampered thus creating security hole.
Prev Next



Post Interview Questions


 
     
     
 
Home  |  About Us  |  Post Walk-in for FREE  |  Policies  |  Contact Us  |  Advertise
 
 
Copyright © 2008 WalkinsIndia.com.   All Rights Reserved.