Can you compare ASP.NET sessions with classic ASP?

 Posted by ArticlesMaint on 9/17/2009 | Category: ASP.NET Interview questions | Views: 3360

ASP. NET session caches per user session state. It basically uses “HttpSessionState” class.

Following are the limitations in classic ASP sessions: -

• ASP session state is dependent on IIS process very heavily. So if IIS restarts ASP session variables are also recycled.ASP.NET session can be independent of the hosting environment thus ASP. NET session can be maintained even if IIS reboots.

• ASP session state has no inherent solution to work with Web Farms.ASP.NET session can be stored in state server and SQL SERVER which can support multiple server.

• ASP session only functions when browser supports cookies.ASP.NET session can be used with browser side cookies or independent of it.

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Jaimie on: 2/1/2016 | Points: 10

3065 Points

726 Posts
Re: Classic ASP VS ASP.NET?

May 25, 2011 10:33 AM|LINK

Here is my $.02. Some of the major differences include

ASP uses scripting languages such as javascript or vbscript to perform server-side manipulation. These languages are typeless interpreted languages. This means there is no such thing as a string or a number in these languages (kind of, but not really) and no support for class OOP techniques.
ASP.NET can be built from any language that has been integrated into the .NET framework. A non-exhaustive list includes C#, VB.NET, Python, C++, more
These .NET languages allow for OOP and managed code, while classic ASP relies on COM and ActiveX to build re-usable libraries or tools.
.NET has additional methods to persist data in addition to the Session variables commonly used in classic ASP. These include ViewState and ControlState. This means that some of the tedious work from ASP such as storing information in hidden variables and then re-populating and updating these values with each post or get is automatically handled by ASP.NET. Additionally, .NET has an event-driven lifecycle for the page, meaning that specific events on the page such as clicking a button can be handled individually.
.NET pages are structured as objects with functions, methods, properties, and events instead of the global free for all that occurs in most classic ASP pages.
ASP.NET has built in controls that handle much of the everyday tasks required in an html page. For example a GridView control can be used to build a table of data that is linked to a datasource. The datasource can also be a control. The benefit of using these controls is that they handle the low-level html generation and allow the developer to spend more time on working out logic and styling instead of having to worry about missing </tr> or </td> tags, etc.


Both are run on a server through IIS (or some similar method) and generate html that is returned to the client.
The VBScript syntax is basically the same as VB.NET.
Data is passed back and forth routinely through Request.Form or Request.QueryString; however, ASP.NET can directly access controls on the page.

Login to post response