.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> ASP.Net >> Post New Question Subscribe to Interview Questions

what is different between session and application

Posted By :sibasish     Posted Date :January 20, 2009    Points :10   Category :ASP.Net 
session is a object that store information between http request for a paticular user.
->But application object are global for each user

You can also find related Interview Question to what is different between session and application  below: 

Differences between application and session.

  
The session object maintains state on a per client basis whereas the application object is on a per application basis and is consistent across all client requests. (More...)

Which typically consumes more memory: application state or session state?

  
Session state tends to use much more memory than application state, because copies of all variables are stored for each user. (More...)

Which might not work if a user has disabled cookies in his or her Web browser: application state or session state?

  
Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies. (More...)

Which typically consumes more memory: application state or session state?

  
Session state tends to use much more memory than application state, because copies of all variables are stored for each user. (More...)

Which might not work if a user has disabled cookies in his or her Web browser: application state or session state?

  
Session state, by default, won't work if a Web browser that supports cookies has cookies disabled. Application state isn't user-specific, though, and doesn't need to be tracked in cookies. Therefore, application state works regardless of cookies (More...)

What is the difference between Application caching and session objects?

  
Session A session is the time for which a particular user interacts with a web application. During a session the unique identity of the user is maintained internally. A session ends if there is a session timeout or user ends sessionby logging out.Sessions may change from user to user.

Cache Caching can be used to temporarily store page output or application data either on the client or on the server, which can then be re-used to satisfy subsequent requests and thus avoid the overhead of re-creating the same information.Caching is particularly suitable when you expect to Cache will be applicable to the entire application through out it's life cycle return the same information in the same format for many different requests.

Application Its nothing but similar to Session with a bit difference that is Session objects have scope within a particular session while application objects having scope within entire application. Application are accessible only from code running within the context of the originating application. Other applications running on the system cannot access or modify the values.
(More...)

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 (More...)

What do you mean by SESSION and APPLICATION object in asp.net?

  
Session object store information between HTTP requests for a individual user and application object are global across all users. (More...)

What do ypu mean by SESSION and APPLICATION object ?

  
Session object store information between HTTP requests for a particular user, while application object are global across users. (More...)

What is the difference between ViewState,Application and Session of a Page?

  
View State:

- View state is maintained in page level only.
- View state of one page is not visible in another page.
- View state information stored in client only.
- View state persist the values of particular page in the client (browser) when post back operation done.
- View state used to persist page-instance-specific data. (Read more)

Session State:

- Session state is maintained in session level.
- Session state value is available in all pages within a user session.
- Session state information stored in server.
- Session state persist the data of particular user in the server. This data available till user close the browser or session time completes.
- Session state used to persist the user-specific data on the server side. (Read more)

Application State

ApplicationState is a variable you can store values in during the life off the application (may get cycled periodically, and without your knowledge) (used less-frequently)


Usage

- If you want to access the information on different web pages, you can use SessionState
- If you want to access from the same page, then you can use Viewstate
-Application State it's global, for all users

Security

Session state provides more security when compared with view state as the data value is stored in server side (More...)

What is Application Domain?

  
The primary purpose of the AppDomain is to isolate an application from other applications. Win32 processes provide isolation by having distinct memory address spaces. This is effective, but it is expensive and doesn't scale well. The .NET runtime enforces AppDomain isolation by keeping control over the use of memory - all memory in the AppDomain is managed by the .NET runtime, so the runtime can ensure that AppDomains do not access each other's memory.
Objects in different application domains communicate either by transporting copies of objects across application domain boundaries, or by using a proxy to exchange messages.
MarshalByRefObject is the base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Objects that do not inherit from MarshalByRefObject are implicitly marshal by value. When a remote application references a marshal by value object, a copy of the object is passed across application domain boundaries. (More...)

I have written an assembly that I want to use in more than one application. Where do I deploy it?

  
Assemblies that are to be used by multiple applications (for example, shared assemblies) are deployed to the global assembly cache. In the prerelease and Beta builds, use the /i option to the Alink SDK tool to install an assembly into the cache:
al /i:myDll.dll
A future version of the Windows Installer will be able to install assemblies into the global assembly cache. (More...)

What is an application domain?

  
An application domain (often AppDomain) is a virtual process that serves to isolate an application. All objects created within the same application scope (in other words, anywhere along the sequence of object activations beginning with the application entry point) are created within the same application domain. Multiple application domains can exist in a single operating system process, making them a lightweight means of application isolation.
An OS process provides isolation by having a distinct memory address space. While this is effective, it is also expensive, and does not scale to the numbers required for large web servers. The Common Language Runtime, on the other hand, enforces application isolation by managing the memory use of code running within the application domain. This ensures that it does not access memory outside the boundaries of the domain. It is important to note that only type-safe code can be managed in this way (the runtime cannot guarantee isolation when unsafe code is loaded in an application domain). (More...)

Describe the techniques for optimising your application?

  
. Avoid round-trips to server. Perform validation on client.
. Save viewstate only when necessary.
. Employ caching.
. Leave buffering on unless there is a dire need to disable it.
. Use connection pooling.
. Use stored procedures instead of in-line SQL or dynamic SQL. (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend