New Features of ASP. NET 4.0 (clear Web. Config file)

Source: Internet
Author: User
List of. NET 4.0 Framework articles

Original article address

Clean Web. Config Files

(1) Web. Config in the past

In the past, the size of the Conifg file in asp.net porject was a regular development, for example, creating a Web porject Web in Vs2008Sp1. config is the first line, including the definition of ASP.. net http pipeline handlers and modues.

In. net2.0 ,. net 3.5 uses the same CLR, so. machine in net2.0. config can run in. net 3.5, and you only need to install the new Framework and update the assemblies. The risk is not avoided. I will rewrite the custom part settings for machine. Conifg of the original. net 2.0. We have not registered new tags, handlers and modules. So you only need to install a new Framework to run New Features of. Net3.0 and. net3.5.

However, if we write some Web. conifg configurations by default for each registered new project, the size and complexity of the Web. config file will not increase, and it is not easy to read and manage.

(2) Web. config in asp.net 4.0

In. NET4 includes the new version of CLR and the new version. net 4 machine. config configuration file. net2.0 and. net 3 ,.. net 3.5 files exist at the same time and can be used at the same time .)

All ASP. NET labels, hanlder and modules will be registered in the new. NET 4 machine. config. The following functions are provided;

• ASP. NET AJAX
• ASP. NET Dynamic Data
• ASP. NET Routing (which can now be used for both ASP. NET WebForms and ASP. net mvc)
• ASP. NET Chart Control (which now ships built-into ASP. NET V4)

The following figure shows how to create an empty ASP. NET Application project.

In the figure, the first web. the config tag tells ASP. NET application framework adjustment, that is.. net version. You can set it by using the intelliisense of target of, in addition, you can use the target version in the IDE to automatically enable intelliisense .)

The second part is to specify whether to use ASP. NET HttpModules to control URL requests of all ASP. NET Applications When ASP. NET applications are running in IIS 7. We authorize by default. That is to say, by default, the system is compatible with IIS 7 and uses URL requests in IIS 7 for control. ASP. net urls modules will be configured in Machine. config.

(3) Multi-file configuration of Web. config

In fact, the new. net 4.0, a new application pool ASP. NET V4, so that at least two ASP.. NET.

The above is also a learning and summary!
Worksguo
Www.cnblogs.com/worksguo
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.