asax File
The Global.asax file, also known as the ASP.NET application file, is an optional file that
contains code for responding to application-level events raised by ASP.NET or by HTTP modules.
The Global.asax file resides in the root directory of an ASP.NET-based application. At run time,
Global.asax is parsed and compiled into a dynamically generated .NET Framework class derived
from the HttpApplication base class. The Global.asax file itself is configured so that any direct
URL request for it is automatically rejected; external users cannot download or view the code
written within it.
The ASP.NET Global.asax file can co-exist with the ASP Global.asa file. You can create a
Global.asax file either in a WYSIWYG designer, in Notepad, or as a compiled class that you
deploy in your application's \bin directory as an assembly. However, in the latter case, you still
need a Global.asax file that refers to the assembly.
The Global.asax file is optional. If you do not define the file, the ASP.NET page
framework assumes that you have not defined any application or session event handlers.
When you save changes to an active Global.asax file, the ASP.NET page framework
detects that the file has been changed. It completes all current requests for the application, sends
the Application_OnEnd event to any listeners, and restarts the application domain. In effect, this
reboots the application, closing all browser sessions and flushing all state information. When the
next incoming request from a browser arrives, the ASP.NET page framework re-parses and
recompiles the Global.asax file and raises the Application_OnStart event.
Managed code
Code that runs under a "contract of cooperation" with the common language runtime.
Managed code must supply the metadata necessary for the runtime to provide services
such as memory management, cross-language integration, code access security, and
automatic lifetime control of objects. All code based on Microsoft intermediate language
(MSIL) executes as managed code. See also: Microsoft intermediate language (MSIL).
Managed data
Objects whose lifetimes are managed by the common language runtime. The runtime
automatically handles object layout and manages references to these objects, releasing
them when they are no longer being used..
Metadata
Information that describes every element managed by the common language runtime: an
assembly, loadable file, type, method, and so on. This can include information required
for debugging and garbage collection, as well as security attributes, marshaling data,
extended class and member definitions, version binding, and other information required
by the runtime.
Shared assembly
An assembly that can be referenced by more than one application. An assembly must be
explicitly built to be shared by giving it a cryptographically strong name.
n (if provided)—strengthened by a public key and a digital signature generated over the
assembly. Because the assembly manifest contains file hashes for all the files that
constitute the assembly implementation, it is sufficient to generate the digital signature
over just the one file in the assembly that contains the assembly manifest. Assemblies
with the same strong name are expected to be identical.
Private assembly
An assembly that is available only to clients in the same directory structure as the
assembly.
Interface
A reference type that defines a contract. Other types implement an interface to guarantee
that they support certain operations. The interface specifies the members that must be
supplied by classes or other interfaces that implement it. Like classes, interfaces can
contain methods, properties, indexers, and events as members.
Reference type
A data type that is stored as a reference to the value's location. The value of a reference
type is the location of the sequence of bits that represent the type's data. Reference
types can be self-describing types, pointer types, or interface types.
Value type
A data type that fully describes a value by specifying the sequence of bits that constitutes
the value's representation. Type information for a value type instance is not stored with
the instance at run time, but it is available in metadata. Value type instances can be
treated as objects using boxing.
View state
The current property settings of an ASP.NET page and those of any ASP.NET server
controls contained within the page. ASP.NET can detect when a form is requested for the
first time versus when the form is posted (sent to the server), which allows you to
program accordingly.
Boxing
The conversion of a value type instance to an object, which implies that the instance will
carry full type information at run time and will be allocated in the heap. The Microsoft
intermediate language (MSIL) instruction set's box instruction converts a value type to an
object by making a copy of the value type and embedding it in a newly allocated object.
Garbage collection (GC)
The process of transitively tracing through all pointers to actively used objects in order to
locate all objects that can be referenced, and then arranging to reuse any heap memory
that was not found during this trace. The common language runtime garbage collector
also compacts the memory that is in use to reduce the working space needed for the
heap.
Global assembly cache (GAC)
A machine-wide code cache that stores assemblies specifically installed to be shared by
many applications on the computer. Applications deployed in the global assembly cache
must have a strong name.
Heap
A portion of memory reserved for a program to use for the temporary storage of data
structures whose existence or size cannot be determined until the program is running.
XML Web services
A programming model that provides the ability to exchange messages in a scalable,
loosely coupled, and platform-neutral environment using standard protocols such as
HTTP, XML, XSD, SOAP, and WSDL. The SOAP-based XML messages exchanged
between an XML Web service and its clients can be structured and typed, or loosely
defined. The flexibility of using a text format such as XML enables the message
exchange to evolve over time in a loosely coupled way. Because they are based on
standard protocols and are platform neutral, XML Web services enable communication
with a broad variety of implementations, platforms, and devices.