Back to Catalog
The Assembly of the site Bin directory is generally composed of system projects, project references external DLLs and plug-in DLLs, they will be automatically loaded when the site is run, it is important that the project itself DLL and project introduced DLL will automatically load, this is no problem, and plug in the bin directory DLL will automatically load, This is important because it makes our applications more flexible and more scalable in the development of common functionality!
An example, such as a HttpModule, is a generic feature that adds some shared information about cache expiration to the page, which is common to all of your sites, so that you can build a HttpModule project where the code might be
namespacetesthttpmodule{ Public classSeomodule:ihttpmodule {#regionIHttpModule Members Public voidDispose () {Throw Newnotimplementedexception (); } Public voidInit (HttpApplication context) {context. BeginRequest+=NewEventHandler (context_beginrequest); } voidContext_beginrequest (Objectsender, EventArgs e) { varApplication =(HttpApplication) sender; Application. Context.Response.Expires=0; Application. Context.Response.ExpiresAbsolute= DateTime.Now.AddDays (-1); Application. Context.Response.AddHeader ("pragma","No-cache"); Application. Context.Response.AddHeader ("Cache-control","Private"); } #endregion }}
For the catalog site, you only need to configure the module in Web. config.
</pages> "seomodule" type= " Testhttpmodule.seomodule "/>
This module.dll is copied directly to the bin directory of the target website, and the Web site can be loaded automatically.
In fact, through this project of. NET applications, we can develop a lot of common modules, and a good combination of specific projects, to achieve the specific project of "functional hot-swappable"!
Back to Catalog
The foundation is the heavy weight-assembly auto-load under the site Bin directory