Programming Microsoft ASP.NET 4 - Dino Esposito [98]
Table 5-7 lists some of the assemblies that are automatically provided to the compiler for an ASP.NET 4 application.
Table 5-7. Assemblies Linked by Default in ASP.NET 4
Assembly File Name
Description
mscorlib
Provides the core functionality of the .NET Framework, including types, AppDomains, and run-time services
System.dll
Provides another bunch of system services, including regular expressions, compilation, native methods, file I/O, and networking
System.Configuration.dll
Defines classes to read and write configuration data.
System.Core.dll
Provides some other core functionality of the .NET Framework, including LINQ-to-Objects, the time-zone API, and some security and diagnostic classes
System.Data.dll
Defines data container and data access classes, including the whole ADO.NET framework
System.Data.DataSetExtensions.dll
Defines additional functions built over the ADO.NET DataSet object
System.Drawing.dll
Implements the GDI+ features
System.EnterpriseServices.dll
Provides the classes that allow for serviced components and COM+ interaction
System.Web.dll
Indicates the assembly implements the core ASP.NET services, controls, and classes
System.Web.ApplicationServices.dll
Provides classes that enable you to access ASP.NET authentication, roles, and profile functions via a bunch of built-in WCF services
System.Web.DynamicData.dll
Provides classes behind the ASP.NET Dynamic Data framework
System.Web.Entity.dll
Contains the code for the EntityDataSource component that supports Entity Framework
System.Web.Extensions.dll
Contains the code for AJAX extensions to ASP.NET
System.Web.Services.dll
Contains the core code that makes Web services run
System.Xml.dll
Implements the .NET Framework XML features
System.Xml.Linq.dll
Contains the code for the LINQ-to-XML parser
Note that you can modify, extend, or restrict the list of default assemblies by editing the global settings in the root web.config file under
%Windows%\Microsoft.NET\Framework\v4.0.30319\Config
If you do so, changes will apply to all ASP.NET applications run on that Web server. Alternatively, you can modify the assembly list on a per-application basis by editing the By default, the It means that any assembly found in the binary path of the application should be treated as if it were registered through the @Assembly directive. To prevent all assemblies found in the Bin directory from being linked to the page, remove the entry from the root configuration file. To link a needed assembly to the page, use the following syntax: <%@ Assembly Name="AssemblyName" %> <%@ Assembly Src="assembly_code.cs" %> The @Assembly directive supports two mutually exclusive attributes: Name and Src. Name indicates the name of the assembly to link to the page. The name cannot include the path or the extension. Src indicates the path to a source file to dynamically compile and link against the page. The @Assembly directive can appear multiple times in the body of the page. In fact, you need a new directive for each assembly to link. Name and Src cannot be used in the same @Assembly directive, but multiple directives defined in the same page can use either. Note In terms of performance,