ASP & ASP.NET Comparing
ASP stand for “Active server Pages” also called classic ASP. It was Microsoft\'s first server-side script-engine for dynamically-generated web pages.
To create a website using classic asp one has to use Vbscript. Jscript is another active scripting engine that is available from Microsoft. Other third party Engines were PerlScript. Though The VBScript is most popular one.
Active Server Pages has 7 inbuilt objects as follows
By adding built-in objects, server-side scripts, access to databases, and ActiveX components. Another important development by Microsoft was to make the ASP scripting environment compliant with the Component Object Model (COM). COM created a standard communication mechanism between components. This step allowed non-vendor components; to share their properties, methods and events with other components in a process called OLE automation. Non-vendor components greatly extend the functionality of ASP applications.
ASP employs a scripting environment and VBScript is the default scripting language of choice. However, you can use other languages (such as JScript and Perl) as long as they have a scripting engine that is compatible with the ActiveX scripting standard.
Fortunately, you are not limited to just using Active Server Pages with Microsoft\'s Internet Information Server (IIS) and this has enhanced the popularity of ASP. E.g. Chili!Soft is a proven industry leader in providing ASP engines for use with Web servers from FastTrack, Lotus, Netscape, O\'Reilly, and many others. And Halcyon Software offers a brilliant Java-based implementation of the Microsoft ASP framework, allowing developers to deploy ASP applications on any platform.
new feature of version 3.0 is the addition of a seventh, intrinsic object called ASPError which greatly simplify error handling. Other new features include the addition of three new methods to the Server object, and two new methods to both the Application object and the Session object.
The WebPages created using Classic ASP have extension “.asp”. The Classic ASP page is Mixture of HTML Tags along(design) with Code (VBSCRIPT/JSCRIPT)(logic)
<% Response.Write \"Hello World!\" %>
<%= \"Hello World!\" %>
Vbscript is popular scripting language used to create classic ASP Web page. While C# is programming Language of choice to create asp.net pages. Vbscript is weakly typed language while C# by default is not. C# requires you to declare all variables, including their type before you use it in code VBScript offers very little in the way of OOP. You can create classes but you cannot do any advanced things with them such as polymorphism or inheritance.
public property get value
value = myVal
public property let value(x)
myVal = x
set bork = FooBar
set mork = FooBar
bork.value = 100
mork.value = 3
msgbox bork.value * mork.value
VBScript can use OLE automation objects created in other languages - also the windows scripting host (if you access VBScript this way) can be told to extend the language with any COM objects you want. For example you can create a class in VB, inform the scripting control about a particular instance of the class using its AddObject method, and then call methods of the class from the script.
If you are only using VBScript from HTML then your options are severely limited however you will have access to HTML form objects which is more than can be said for regular VBScript programs that are not embedded in HTLM or launched using the scripting host.
Session Object in Classic ASP & ASP.net:
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.
Traditional ASP can run only on- Microsoft platforms. ASP runs under the inetinfo.exe IIS (Internet Information Server) process space. While ASP.net process is separate from inetinfo.exe and is not related to the IIS process isolation settings.