Important open-source components of. Net [updating]

Source: Internet
Author: User

<1> lo4net Logging

1.1Log4netAdvantages:

Almost all large applications have their own APIs for tracking and debugging. Once a program is deployed, it is unlikely that special debugging tools will be used. However, an administrator may need a powerful log system to diagnose and fix configuration problems.
Experience shows that logging is often an important part of the software development cycle. It has the following advantages: it provides a precise environment when the application is running, allowing developers to locate bugs in the application as soon as possible; once the log output code is added to the program, logs can be generated and output during the program running without manual intervention. In addition, log information can be output to different places (such as the console and files) for future research.
Log4net is a log record package designed for this purpose and used in the. NET development environment.

1.2Log4netInstallation:

You can download the source code of log4netfrom http://logging.apache.org/log4net. After the package is decompressed, load log4net. sln to Visual Studio. NET in the decompressed src directory. After compilation, you can obtain log4net. dll. To add the log function to your program, you only need to introduce log4net. DLL into the project.

Add the configuration document in global. asax when using it, mainly to apply the log and specify the path of the record file.

For example:

Void application_start (Object sender, eventargs E)
{
// Code that runs on application startup
Log4net. config. basicconfigurator. configure (New log4net. appender. fileappender (New log4net. layout. patternlayout ("% d [% T] %-5 p % C [% x]-% m % N"), "logfile/logfile. log "));
}

<2> mysql. Data. dll [Mysql Data operation]
MySQL connector/net is an ADO. Net driver for MySQL
This component is a. Net access component designed for accessing the MySQL database by using ADO. net.
After the component is installed, reference the namespace mysql. Data. mysqlclient;
This component makes it easy for us to use MySQL in. net, and similar to SQL data operations. This makes programming clearer and more convenient.
Http://www.mysql.com/products/connector/net/here are some useful documents.

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.