Firstly, ASP.NET is always compiled whereas PHP is usually interpreted but it can be compiled using commercial compilers. Secondly, websites developed through ASP.NET can be hosted only in windows servers whereas websites developed through PHP can be hosted in windows as well as linux servers.
Firstly, ASP.NET is always compiled as it uses .Net language like C# whereas ASP is interpreted as it uses VBScript. Secondly, in ASP error handling is very poor whereas in ASP.NET tools like Microsoft Visual Studio used for debugging help in error handling. Thirdly, ASP does not have built in support for xml whereas ASP.NET has full support for xml.
CLR is used to manage the execution of .NET programs. It uses just-in-time which converts compiled code into machine code and then executes it. It has 4 primary functions which are Garbage collection, Code Access Security(CAS), Code Verification(CV) and Intermediate Language(IL) to native translation.
Different Types of JIT are:
A) Pre-JIT - Complies complete source code into native code in a single cycle at the time of deployment.
B) Econo-JIT - Complies those methods that are called at runtime. They are removed when they are not required anymore.
C) Normal-JIT - Complies those methods that are called at runtime and then they are stored in cache. Next time when the same methods are called, compiled code will be taken from cache.
Managed code is written in any high level programming language like C#, J# etc. Which is used with .NET framework. It will execute inside the environment of Common Language Runtime (CLR) i.e. .NET runtime. Note that all Intermediate Language (IL) are managed code. If you want to use any third party software i.e. VC++ etc. they are unmanaged code.
A web application resides in the server and responds to the client's requests over internet. When a client accesses the web page using browser from his machine and makes a request, it receives the response in HTML form which is displayed by the browser. Microsoft Internet Information Services (IIS) is required to run this web application on the server side. IIS sends the request of the client to the application. The application returns the requested result to IIS in HTML form then IIS sends this result to the client.
Serialization is an object conversion into a stream of bytes and deserialization is creation of an object from a stream of bytes.
1.Application_Start - Triggers when the first user visits a page of the application or 2.first resource is requested from the server.
3.Application_End - Triggers when there are no more users of the application.
4.Application_BeginRequest - Triggers at the beginning of each request to the server.
5.Application_EndRequest - Triggers at the end of each request to the server.
6.Session_Start - Triggers when a new user visits.
7.Session_End - Triggers when the users stop requesting pages and their session times out.