共用方式為


ASP Clasic Vs ASP.Net

ASP CLASIC & ASP.NET:

 

Classic ASP is a server-side scripting environment that you can use to create and run dynamic web applications. With ASP, you can combine HTML pages, script commands, and COM components to create interactive web pages that are easy to develop and modify. Classic ASP is the predecessor to ASP.NET, but it is still in wide use today.The Classic ASP server configuration adds IIS modules for ASP and ISAPI extensions to the default IIS installation.

 

The No Managed Code setting for the application is clear in the TechNet page https://technet.microsoft.com/library/hh831797.aspx as stating to use this setting for applications that will NOT use the .NET framework. By selecting the version of the .NET framework for the application, the worker process will load the version of the CLR for the application to run correctly. The No Managed Code setting for the application pool is meant to run scripting engines like ASP as the CLR will NOT be loaded in the worker process and may improve performance of the start up for the worker process.Just make sure the ASP code is not making a code reference to a .NET resource.

 

 

 

ddd

 

some concepts:

  • ASP, Active Server Pages (now referred to as ASP Classic) is a server-side scripting environment that predates .Net and has nothing to do with it
    ASP pages are usually written in VBScript, but can be written in any language supported by the Windows Scripting Host - JScript and VBScript are supported natively, with third-party libraries offering support for PerlScript and other dynamic languages.
  • .Net is a framework for managed code and assemblies
    .Net code can be written in any language that has an CIL compiler.
  • CLR, Common Language Runtime, is the core runtime used by the .Net framework
    The CLR transforms CIL code (formerly MSIL) into machine code (this is done by the JITter or by ngen) and executes it.
  • ASP.Net is a replacement for ASP built on .Net
    ASP.Net pages can be written in any .Net language, but are usually written in C#.

 

Other terms :

  • CIL, Common Intermediate Language, is an intermediate language that all .Net code is compiled to.
    The CLR executes CIL code.
  • CLI, Common Language Infrastructure, is the open specification for the runtime and behavior of the .Net Framework
  • Mono is an open-source implementation of the CLI that can run .Net programs
  • ASP.Net MVC is an MVC framework built on ASP.Net

 

if you want to make use of no manage code in IIS using asp clasic [scripting engine] this will improve performance  but using user friendly and modern web pages OOP and  manage code using CLR are done with asp.net . Both are frameworks to make it esier for us to develope web aplication dinamycally  and then once the asp.net /asp is hosted on the workwer process w3wp.exe can render  asp/asp.net web applications to HTML/text  format for browsers which will render to screen again.

some diferents between asp clasic and asp.net:

  1. ASP is interpreted while ASP.NET is compiled.
  2. ASP use ADO while ASP.NET use ADO.NET to for database connectivity.
  3. ASP usage classic languages like VB Script while ASP.NET use .NET classes like C#.
  4. ASP page use .asp extension and ASP.NET use .aspx extensions.

ASP

  1. It has limited oops support and not having built in support for XML.
  2. Very less development and debugging tool available.
  3. Error handling is very poor.
  4. It has no in built validation control. Meaning that validating page is difficult for developers.

ASP.NET

  1. It has full support of XML. Which helps easy data exchange.
  2. Various tools and compiler available.
  3. Error handling is very good.
  4. In built validation controls. It has rich validation set - range validator, custom validator and regular expresión.

There's major differences between classic ASP and ASP.NET, almost nothing is alike. For example classic ASP isn't based on the .Net framework, it doesn't use Code Behind files and object oriented programming.

  • 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.

 

Similarities

  • 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.

To build a clasic web site follow this link please :  https://www.iis.net/learn/application-frameworks/running-classic-asp-applications-on-iis-7-and-iis-8/scenario-build-a-classic-asp-website-on-iis

 

some information was taken from: https://blogs.msdn.microsoft.com/ericparvin/2014/09/19/asp-code-and-no-managed-code-option-in-application-pool/\#comment-295

Comments

  • Anonymous
    July 12, 2016
    Thanks for such good information! very detailed approach.
    • Anonymous
      August 07, 2016
      :) thanks
  • Anonymous
    August 26, 2016
    Sorry for my English Google translator. For 15 years I develop extensive programs in Classic ASP web environment.I've never had problems that limited my work with a simple notebook. Classic ASP with jQuery, Ajax, JSON, XML overcomes any difficulty.I can connect to a webservice Moodle and add students, tutors and courses from a data base M.Access. I can generate and print dozens of self-adhesive labels with a web. I can send mail massively from database. I can combine ASP Classic and Bootstrap ... ALL.