New features in. NET Framework 2.0

Source: Internet
Author: User
Tags pkcs7 rfc file transfer protocol
New features in. NET Framework 2.0

In Microsoft. on the basis of. NET Framework 1.1 ,.. NET Framework 2.0 has been expanded to improve not only the existing functions, but also some new functions and enhance the documentation. This section provides information about some major additions and modifications.

For more information about compatibility and the list of public API changes that may affect application compatibility, see Compatibility Considerations and Version Changes (Compatibility Considerations and Version Changes ).

64-bit platform support

The new generation of 64-bit computers enables people to create applications that run faster than 32-bit applications and make better use of memory than 32-bit applications. The new support for 64-bit applications enables users to generate hosted code libraries on 64-bit computers or easily use unmanaged code libraries. For more information, see .

Access Control List support

The access control list (ACL) is used to grant or revoke access to resources on a computer .. . NET Framework has added a new class that allows the managed code to create and modify the ACL. I/O class, registry class, and Thread class add new members using ACL.

ADO. NET

ADO. the new features in. NET include support for user-defined types (UDT), asynchronous database operations, XML data types, metadata types, and Snapshot isolation, and support for new attributes that allow applications to support multi-activity result set (MARS) through SQL Server 2005. For more information about these new features of ADO. NET and other new features of ADO. NET, see .

ASP. NET

Microsoft. NET Framework 2.0 includes important enhancements to ASP. NET. For web development, the new control makes it easier to add common functions to dynamic web pages. The new data control makes it possible to display and edit data on the ASP. NET webpage without writing code. The improved code hiding model makes it easier and more reliable to Develop ASP. NET pages. The cache function provides multiple new ways to cache pages, including the ability to generate cache dependencies on SQL Server database tables.

Now, you can customize websites and webpages in multiple ways. The configuration file attributes enable ASP. NET to automatically track the attribute values of a single user. By using Web Components, you can create pages that users can customize in the browser. You can use simple controls to add navigation menus.

The improvement of website functions allows you to create professional websites more conveniently and quickly. The master page allows you to create consistent la s for all pages on the site, while the topic allows you to define consistent appearances for controls and static text. To help protect your site, you can pre-compile the website to generate executable code from the source file (marked in the code file and. aspx page. Then, you can deploy the result output to the finished server, and the result output does not contain any source information. ASP. NET enhancements also include new tools and classes that make website developers, server administrators, and administrators easier to manage websites.

ASP. NET is suitable for multiple browsers and devices. By default, the control Displays output conforming to the XHTML 1.1 Standard. You can use the device filter function to specify different property values for the same control in different browsers.

For a complete list of new ASP. NET functions, see .

Authenticated stream

Applications can use the new And Class for authentication, and helps protect the security of information transmitted between the client and the server. These authenticated stream classes support mutual authentication, data encryption, and data signature. The NegotiateStream class uses the negotiated security protocol for identity authentication. The SslStream class uses the Secure Socket Layer (SSL) security protocol for identity authentication.

COM Interop service enhancements

Class and tool added four main enhancements to support interoperability with COM:

  • The operating system maintains a limited number of handles used to reference key operating system resources. New And Class and its dedicated Derived classes provide a safe and reliable way to operate the operating system handle.

  • The improvement of mail sending makes it easier to interact with the local code. The two enhancement features of the interoperability feater meet the two most common user requirements: the ability to wrap the local function pointer to the delegate and to encapsulate a fixed-size structure array inside the structure.

  • For common call types, the call performance between applications in different application domains is faster.

  • And The new switch removes the dependency on the registry resolution type library reference. This enhancement is important for creating a reliable generation environment.

Console class Addition

The new members of the class enable the application to operate on the size of the console window and screen buffer; move the rectangular area of the screen buffer (which is useful for performing smooth and simple animations ); wait until a key is pressed. Other new class members control the foreground and background color of the text, the visibility and size of the cursor, and the frequency and duration of console alerts.

Data Protection API

The new data protection API (DPAPI) contains four methods that allow applications to encrypt passwords, keys, and connection strings without calling the platform. You can also encrypt memory blocks on computers running Windows Server 2003 or later.

Debugger display attributes

You can now control how Visual Studio displays classes or members when you debug an application. The display attribute function of the debugger enables you to identify the most useful information to be displayed in the debugger.

Debugger edit and continue to support

. NET Framework 2.0 re-introduces the "edit and continue" function, which enables users who debug applications in Visual Studio to change the source code while executing in interrupted mode. After the application edits the source code, you can continue to execute the code and observe the effect. Additionally, the edit and continue feature is available in any programming language supported by Visual Studio.

Detect Network Connection changes

Class allows applications to receive notifications when the Internet Protocol (IP) address of the network interface (also known as the network adapter or adapter) is changed. There are many reasons to change the interface address, such as network cable disconnection, out of the range of the wireless LAN, or hardware failure. NetworkChange provides address change notifications by initiating an event when detecting address changes.

Distributed Computing

In In the namespace, you have added support for FTP client requests, HTTP resource caching, automatic proxy discovery, and network traffic and statistics. The namespace now contains a Web server class ( ), You can use it to create a simple Web server to respond to HTTP requests. Classes that generate network traffic have been detected to output tracing information for application debugging and diagnosis. Security and performance enhancement are added to the System. Net. Sockets. Socket and System. Uri classes.

Added support for SOAP 1.2 and empty elements in the System. Web. Services namespace.

Added the channel security function in the System. Runtime. Remoting. Channels namespace. TCP channels now support authentication and encryption, as well as a variety of new features to better support load balancing.

EventLog Enhancement

Now you can Custom DLL is used for messages, parameters, and categories.

Extended Certificate Management

. NET Framework now supports X.509 Certificate storage area, certificate chain, and certificate Extension. In addition, you can use the X.509 Certificate to sign and verify the XML without using the platform call. It also supports PKCS7 signature and encryption and CMS (PKCS7 standard superset available on Microsoft Windows 2000 and later operating systems. PKCS7 is the basic format used to sign and encrypt data in secure/multi-purpose Internet Mail Extensions (S/MIME. For more information, see Class topic.

FTP support

Applications can now use , And Class to Access File Transfer Protocol resources.

Generic and generic Sets

. NET Framework 2.0 introduces generics so that you can create flexible reusable code. Generic language functions act as templates that allow unspecified or generic type parameters (rather than specific types) class, structure, interface, method, and delegate. When using generics, the actual type is specified later. Multiple namespaces (for example And ) Provides generic classes and methods. The new System. Collections. Generic namespace provides support for Strongly typed sets. System. Nullable <T> is the standard representation of optional values. Three languages Support generics: Visual Basic, C #, and C ++.

Reflection has been extended to allow runtime checks and operations for generic types and methods. System. Type and System. Reflection. MethodInfo add new members, including identifying generic types (for exampleclass Gen<T,U> {...}) To obtain the type parameter list And create a specific type (for examplenew Gen<int, long>()) .

Globalization

Five new globalization features provide wider support for developing applications in different languages and regions.

  • The support for custom regions allows you to define and deploy regional information as needed. This function is useful for customizing a small number of existing regional definitions and creating a regional definition that does not exist in. NET Framework. For more information, see Attribute.

  • The encoding and decoding operations map Unicode characters to byte streams that can be transmitted to physical media (such as disks or communication lines. If the ing operation cannot be completed, you can use The new encoding and decoding rollback functions supported by multiple classes in the namespace can be compensated.

  • Implementation of UTF-8 Coding The members in the class are several times faster than the previous versions. UTF-8 is the most common encoding used to convert Unicode characters to bytes on a computer.

  • . NET Framework now supports the latest Standardization standards defined by the Unicode Federation. This normalization process converts the character representation of the text to the standard form to compare whether these representations are equal.

  • Method overload provides The cache version of the read-only object. Using this cached version when creating a new CultureInfo object can improve system performance and reduce memory usage.

I/O Enhancement

The availability and functions of various I/O classes have been improved. Users can now read and write text files more easily and obtain information about the drive.

Now you can use The classes in the namespace use GZIP to compress and decompress the standard to read and write data. The ietf rfc 1951 and RFC 1952 specifications describe this standard. IETF Request for Comments (RFC) search page (IETF Request annotation (RFC) search page) Note: The search is only available on the RFC number.

List-based Activation

This feature provides new support for loading and activating applications by using a list. List-based activation is critical to supporting ClickOnce applications. Traditionally, applications are activated by referencing the Assembly containing the application entry point. For example, clicking the. exe file of the application in the Windows Shell causes the shell to load the Common Language Runtime Library (CLR) and call the known entry points in the assembly of the. exe file.

The list-based activation model uses an Application List instead of an assembly for activation. The list fully describes the application, application dependencies, and security requirements. Compared with the Assembly-based activation model, the inventory model has several advantages, especially for Web applications. For example, the list contains the security requirements of the application, which allows the user to decide whether to allow the application to be executed before the code is downloaded. The List also contains information about application dependencies.

List-based activation is provided by a group of APIs that allow hosting hosts to activate applications and external programs described by the list. These APIs include new classes and extensions of existing classes.

This activation model also calls an entity called "Trust Relationship manager", which executes the following tasks:

  1. Determine whether to allow activation of the application. This decision can be made by prompting the user, the query policy, or any other method that is considered appropriate for a given "Trust Relationship manager.

  2. Set the security context in which the application runs. Generally, this step involves setting a code access security (CAS) policy tree on the application domain where the application is to be run.

. NET Framework remote processing

. NET Framework remote processing now supports exchange of IPv6 addresses and generic types. The classes in the namespace support identity authentication and encryption using the Security Support Provider Interface (sspi. New The classes in the namespace allow applications on the same computer to communicate quickly without using the network. Finally, you can configure the connection cache timeout and method retry times to improve the performance of the network load balancing remote cluster.

Obtain information about the network configuration and usage of the local computer.

Use In the namespace, applications can access the statistics of IP, IPv4, IPv6, TCP, and UDP network traffic. The application can also view the address and configuration information of the local computer network adapter. This information is similar to the information returned by the ipconfig.exe command line tool.

Ping

Class allows the application to determine whether the remote computer can be accessed through the network. This class provides functions similar to the ping.exe command line tool and supports synchronous and asynchronous calls.

Process HTTP requests from within the application

You can use the httplistener class to create a simple web server that responds to HTTP requests. The Web server is active during the lifetime of the httplistener object and runs in the application with the application permission. This class is only available on computers running Windows XP Service Pack 2 or Windows Server 2003.

Cached programming Space

Use In the namespace, applications can use the webrequest, webresponse, and WebClient classes to control the cache of the obtained resources. You can use the predefined Cache Policy provided by. NET Framework or specify a custom Cache Policy. You can specify a cache policy for each request and define a default Cache Policy for requests that do not specify a cache policy.

Programming Language

The four Microsoft programming languages are specific to. NET Framework. For more information about new features and enhancements in these languages, see the following topics:

Visual Basic compiler and language

The language improvements in Visual Basic simplify the source code and enable interaction with components that use advanced features.

Compiler

Visual Basic introduces a new Conditional compilation constant vbc_ver for all projects. The value of this version is vbc_ver 8.0.

The Visual Basic command line compiler now stores the default command line options in the vbc. RSP file, which is in the same directory as the command line compiler (vbc.exe. You can edit vbc. RSP to reconfigure the default command line option.

There are four new command line compiler options:

  • Option to generate an XML document file based on the comments in the code.

  • Option to make the compiler ignore the vbc. RSP file.

  • Specifies the code page to use when opening the source file.

  • Specifies the size of the Section in the output file.

  • Option so that the compiler does not reference the standard library.

For more information, see .

Language

In this version of Visual Basic, there are multiple new elements:

Security Exception

Class has been extended to provide additional data that helps investigate the cause of security exceptions. The new attribute provides a lot of information, including methods for exceptions, permissions for the first failure, region or URL of the assembly, failed security operations, and security operations for the call stack that cause exceptions, for example, deny or permitonly.

Support for serial I/O devices

New Class provides applications with the ability to access computer serial ports and communicate with serial I/O devices.

Serialization

And Class now provides version-tolerant serialization, which enables one type to be deserialized from another version. For more information, see .

Currently, XML serialization supports the use of attributes instead of fields to represent schema elements, generic serialization, and Structure. The interface supports custom architecture generation. You can change the architecture during schema import to control proxy code generation. For example, you can use the "Add web reference" function of Visual Studio or The generated proxy is changed.

New You can pre-compile the code used by the web service client to serialize the transmitted information, which greatly shortens the client startup time. For more information, see .

SMTP support

Use And Class in the namespace. The application can send emails to one or more recipients. Emails can be sent in different optional views and can contain attachments. Both CC and BCC are supported.

Support for Strongly typed Resources

Create resource files embedded in executable files and ancillary assembly. Resgen.exe generates a packaging class for each resource file, which allows you to easily access resources and prevent misspelling of resource names.

Thread Improvement

Now, you can name the inter-process communication event completely created in the managed code. Class also supports dedicated resource count.

Track Data Filtering

. NET Framework 2.0 provides a class for tracking and recording system events related to I/O, application startup, and shutdown. However, it is difficult for users to analyze the data because of the large number of trace information and various types. The new support for tracking data filtering allows you to specify the type of information to be recorded.

Transactions

New The namespace contains classes that allow applications to participate in transactions managed by Microsoft Distributed Transaction Coordinator (MSDTC) or local Transaction Manager. The system. Transactions namespace provides Explicit programming model and usage of Classes Class implicit programming model. In the latter model, transactions are automatically managed by this infrastructure. This transaction infrastructure can be easily integrated with existing (COM +) basic transaction structure interactive operations. The system. Transactions namespace also provides classes for implementing resource manager. The Resource Manager manages persistent or variable data used in transactions and works with the transaction manager to ensure atomicity and isolation for applications.

Web Services

Web Services Support soap 1.2 and WS-I basic summary 1.0, which is documented in Web Services Interoperability organization-basic profile version 1.0 (Web Service interoperability organization-Basic Summary Version 1.0.

When two or more Web services that define the sharing type are used, the client proxy generated for these Web Services shares the corresponding types on the client. This allows the client to easily transfer shared instances between Web Services.

Now you can use the event-based programming mode to call Web methods asynchronously.

Functions related to Windows Forms ClickOnce deployment

ClickOnce deployment allows you to deploy self-updated Windows applications that can be installed and run as easily as Web applications. You can deploy Windows clients and command line applications. The new Publish Project command is located on the Build and Project menu in Visual Studio. For more information, see .

Application settings

Application settings of Windows Forms make it easy to create, store, and maintain custom applications and user preferences on the client. By setting Windows Forms, you can not only store application data (such as database connection strings), but also user-specific data (such as the toolbar location and recently used list ). For more information, see .

New data binding model

Because The component acts as an intermediate source for binding controls to the target data source, which simplifies the data binding process. It automatically manages many more difficult binding problems, such as currency, data-related events, and target data source changes. It is also designed to interact with other data-related Windows form controls, especially And Control. For more information, see . The BindingSource component simplifies the process of binding controls to the basic data source. It serves as both a catheter and a data source bound to other controls.

New Windows Forms Control

The DataGridView control provides a powerful and flexible way to display data in tables. It can be used to display a read-only view of a small amount of data, or it can be scaled to display an editable view of a very large dataset. Data can reside in an external data source or be directly added to a control. For more information, see .

A widget is a toolbar that contains menus, controls, and user controls in Windows Forms applications. The ToolStrip class and its associated classes enable you to create a toolbar and other user interface elements that are consistent with the style of Microsoft Windows XP, Microsoft Office, and Microsoft Internet Explorer. You can also use these classes to customize toolbar and user interface elements. For more information, see .

Controls use mask definitions to differentiate valid and invalid user input. For more information, see .

Windows Forms Class allows you to easily include sound in an application. The SoundPlayer class can play audio files in. wav format from a resource or from a Universal Naming Convention (UNC) or an HTTP Location. In addition, the SoundPlayer class enables you to asynchronously load or play sound. For more information, see .

You can set Windows Forms A widget is considered as a complex, which is a two-Panel separated by a removable split bar. When the mouse pointer is hovering over the shard, the cursor changes accordingly to show that the Shard is movable. Use this control to create a complex user interface that is effective for displaying and browsing information and can be adjusted. For more information, see .

Controls now support three features provided by the Windows XP and Windows Server 2003 Series: tiled view, grouping, and drag-and-drop item repositioning.

ListView, And Controls now support , , And The owner description supported by the control.

Control allows you to host web pages in Windows Forms applications. You can use the WebBrowser control to provide HTML-Based Integrated user help or Internet Web browsing functions in applications. In addition, you can use the WebBrowser control to convert an existing Web application to a client application that seamlessly integrates Dynamic HTML (DHTML) code with the user interface functions of Windows Forms. For more information, see .

Controls arrange their content in the horizontal or vertical flow direction. Controls arrange their content in a grid. The layout can be dynamically changed when the application environment is changed because the layout is executed at design time and runtime. For more information, see And .

The Component enables you to perform operations that may take a long time in the background, such as downloading and database transactions. For more information, see .

The asynchronous mode of components is an event-driven model that provides the advantages of multi-threaded applications and hides many complex problems inherent in multi-threaded design. For more information, see .

XML-related functions

. NET Framework 2.0 provides many enhancements, including the new XSL conversion (XSLT) processor; , And Supported types in the class, and new editing functions in the XPathNavigator class. In addition, there are new models used to create XmlReader and XmlWriter objects, as well as many performance improvements. For more information, see .

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.