What is session ,cache, cookie, application memory timeout?

Session timeout: 20 min Cache timeout: duration we have to specify. Cookie: for in memory cookie till browser opened For persistent cookie timeout is till expires property’s time . Application memory timeout: till appdomain exist

In ASP.NET, how to ensure a particular task is executed at a pre-defined time everyday?

Use Cache callback mechanism to ensure a particular task is executed at a pre-defined time everyday in ASP.NET

What are the benefits and limitations of using Hidden Frames?


  • Hidden frames allow you to cache more than one data field.
  • The ability to cache and access data items stored in different hidden forms.


  • Not supported by all browsers
  • Stored data is not secured as it is stored on client’s machine in the form of hidden fields

What are the properties and methods of cache Class ?

Cache Class :
The Add/Insert method of the Cache class is used to add/insert an item into the cache. The Remove method removes a specified item from the cache. The Cache class contains the following properties and methods.

Properties :

  • Count
  • Item

Methods :

  • Add
  • Equals
  • Get
  • GetEnumerator
  • GetHashCode
  • GetType
  • Insert
  • Remove (Overloaded)
  • ToString

What is aggregate dependency?

This dependency allows multiple dependencies to be aggregated for content that depend on more than one resource. In this type of dependency, the removal of the data item from the cache depends on sum of all the defined dependencies.

How can you prevent data to be removed from Cache when memory becomes low?

Use the DisableMemoryCollection property of the CacheSection class.

// Set the DisableMemoryCollection property to true.

CacheSection.DisableMemoryCollection = true;
we can also set through web.config file

<cache disableMemoryCollection="true"/>

CacheSection class belongs to System.Web.Configuration name space.

Can you cache a web page on the basis of stylesheets?

Yes, we can cache a web page on the basis of stylesheets.

Use the VaryByCustom attribute in the OutputCachde directive
<%@ OutputCache Duration=”1000″ VaryByParam=”None” VaryByCustom=”css” %>