What's New in the .NET Framework 2.0 Beta

This is in .Net framework 2.0 SDK beta1 documentation. But oddly enough, this is not in MSDN for Visual Studio 2005 beta1. And this is not in MSDN web site. Anyway, I copied the list from 2.0 SDK beta1 documentation below:

[Omitted changes in ADO.Net, ASP.Net, WinForm, System.Xml, since they are too long, and desire separate articles]

64-Bit Platform Support

The new generation of 64-bit computers enables the creation of applications that can run faster and take advantage of more memory than is available to 32-bit applications. New support for 64-bit applications enables users to build managed code libraries or easily use unmanaged code libraries on 64-bit computers.

Access Control List Support

An access control list (ACL) is used to grant or revoke permission to access a resource on a computer. New classes have been added to the .NET Framework that allow managed code to create and modify an ACL, and new members that utilize an ACL have been added to the I/O, registry, and threading classes.

Authenticated Streams

Applications can use the new NegotiateStream and SslStream classes for authentication and to help secure information transmitted between a client and a server. These authenticated stream classes support mutual authentication, data encryption, and data signing. The NegotiateStream class uses the Negotiate security protocol for authentication. The SslStream class uses the Secure Socket Layer (SSL) security protocol for authentication.

COM Interop Services Enhancements

Four major enhancements have been made to the classes and tools that support interoperability with COM:

·                         The operating system maintains a limited number of handles, which are used to reference critical operating system resources. The new SafeHandle and CriticalHandle classes, and their specialized derived classes, provide safe and reliable means of manipulating operating system handles.

·                         Marshaling improvements make interoperating with native code easier. Two enhancements to the interop marshaler satisfy the two most common user requests: the ability to wrap native function pointers into delegates, and the ability to marshal fixed-size arrays of structures inside structures.

·                         The performance of calls between applications in different application domains has been made much faster for common call types.

·                         New switches on the Type Library Importer (Tlbimp.exe) and Type Library Exporter (Tlbexp.exe) tools eliminate dependency on the registry to resolve type library references. This enhancement is important for creating robust build environments.

Console Class Additions

New members of the Console class enable applications to manipulate the dimensions of the console window and screen buffer; to move a rectangular area of the screen buffer, which is useful for performing smooth, simple animation; and to wait while reading console input until a key is pressed. Other new class members control the foreground and background colors of text, the visibility and size of the cursor, and the frequency and duration of the console beep.

Data Protection API

The new Data Protection API (DPAPI) includes four methods that allow applications to encrypt passwords, keys, connections strings, and so on, without calling platform invoke. You can also encrypt blocks of memory on computers running Windows Server 2003 or later operating systems.

Debugger Display Attributes

Developers can now control how Visual Studio displays a class or member when an application is being debugged. The debugger's Display Attributes feature enables a developer to identify the most useful information to display in the debugger.

Debugger Edit and Continue Support

The .NET Framework 2.0 Beta reintroduces the Edit and Continue feature that enables a user who is debugging an application in Visual Studio to make changes to source code while executing in Break mode. After source code edits are applied, the user can resume code execution and observe the effect. Furthermore, the Edit and Continue feature is available in any programming language supported by Visual Studio.

Detecting Changes in Network Connectivity

The NetworkChange class allows applications to receive notification when the Internet Protocol (IP) address of a network interface, also known as a network card or adapter, changes. An interface address can change for a variety of reasons, such as a disconnected network cable, moving out of range of a wireless local area network, or hardware failure. The NetworkChange class provides address change notification by raising events when a change is detected.

Disjunctive Demands

In prior versions of the .NET Framework, you could not allow multiple code identities access to a class or method. For example, only one strong name could be demanded at a time, creating a problem in situations such as testing multiple strong-named assemblies from different sources. What was needed was a way to combine identity elements using a bitwise OR operation. In response to this need, new disjunctive security actions have been created that allow multiple identity permissions to be simultaneously demanded, inheritance-demanded, or link-demanded. In the case of strong-named assemblies, a developer using the DemandChoice security action can now demand several strong name identities, any of which will allow the stack walk to succeed. The three new security actions that allow disjunctive demands are DemandChoice, InheritanceDemandChoice, and LinkDemandChoice.

Distributed Computing

In the System.Net namespace, support has been added for FTP client requests, caching of HTTP resources, automatic proxy discovery, and obtaining network traffic and statistical information. The namespace now includes a Web server class (HttpWebListener Class) that you can use to create a simple Web server for responding to HTTP requests. Classes that generate network traffic have been instrumented to output trace information for application debugging and diagnostics. Security and performance enhancements have been added to the System.Net.Sockets.Socket and System.Uri classes.

In the System.Web.Services namespaces, support for SOAP 1.2 and nullable elements has been added.

In the System.Runtime.Remoting.Channels namespaces, channel security features have been added. The TCP channel now supports authentication and encryption, as well as several new features to better support load balancing.

EventLog Enhancements

Developers can now use custom DLLs for EventLog messages, parameters and categories.

Expanded Certificate Management

The .NET Framework now supports X.509 certificate stores, chains, and extensions. In addition, you can sign and verify XML using X.509 certificates without using platform invoke. There is also support for PKCS7 signature and encryption, and CMS (a superset of the PCKS7 standard available on Microsoft Windows 2000 and later operating systems). PKCS7 is the underlying format used in Secure/Multipurpose Internet Mail Extensions (S/MIME) for signing and encrypting data. For more information, see System.Security.Cryptography.X509Certificates.X509CertificateEx.

FTP Support

Applications can now access File Transfer Protocol (FTP) resources using the WebRequest, WebResponse, and WebClient classes.

Generics and Generic Collections

The .NET Framework 2.0 Beta introduces generics to allow users to create flexible, reusable code. Language features collectively known as "generics" act as templates that allow classes, structures, interfaces, methods, and delegates to be declared and defined with unspecified, or generic type parameters instead of specific types. Actual types are specified later when the generic is used. Several namespaces, such as System Namespace and System.Collections.Generic, provide generic classes and methods. The new System.Collections.Generic namespace provides support for strongly typed collections. System.Nullable<T> is a standard representation of optional values. Generics are supported in three languages: Visual Basic, C#, and C++.

Reflection has been extended to allow runtime examination and manipulation of generic types and methods. New members have been added to System.Type and System.Reflection.MethodInfo, including HasGenericParameters to detect identify generic types (for example, class Gen<T,U> {...}), GetGenericParameters to obtain type parameter lists, and BindGenericParameters to create specific types, for example, new Gen<int, long>().

Globalization

Five new globalization features provide greater support for developing applications intended for different languages and cultures.

Support for custom cultures enables developers to define and deploy culture-related information as needed. This feature is useful for creating minor customizations of existing culture definitions, and creating culture definitions that do not yet exist in the .NET Framework. For more information, see the T.System.Globalization.CultureAndRegionInfoBuilder class.

Encoding and decoding operations map a Unicode character to or from a stream of bytes that can be transferred to a physical medium, such as a disk or a communication line. If a mapping operation cannot be completed, developers can compensate by using the new encoding and decoding fallback feature supported by several classes in the System.Text namespace.

Users who require greater performance from the UTF8Encoding class, which implements UTF-8, the most common encoding used to transform Unicode characters into bytes on computers, will be pleased to know that members in this class are now several times faster than in previous releases.

The .NET Framework now supports the latest normalization standard defined by the Unicode Consortium. The normalization process converts character representations of text to a standard form so the representations can be compared for equivalence.

The GetCultureInfo method overload provides a cached version of a read-only CultureInfo object. Use the cached version when creating a new CultureInfo object, to improve system performance and reduce memory usage.

I/O Enhancements

Improvements have been made to the usability and functionality of various I/O classes. It is now easier for users to read and write text files and obtain information about a drive.

Developers can now use the classes in the System.IO.Compression namespace to read and write data with the GZIP compression and decompression standard, described in the IETF RFC 1951 and RFC 1952 specifications, available at http://www.ietf.org.

.NET Framework Remoting

.NET Framework remoting now supports IPv6 addresses and the exchange of generic types. The classes in the System.Runtime.Remoting.Channels.Tcp namespace support authentication and encryption using the Security Support Provider Interface (SSPI). Classes in the new System.Runtime.Remoting.Channels.Ipc namespace allow applications on the same computer to communicate quickly without using the network. Finally, you can now configure the connection cache time-out and the number of method retries, which can improve the performance of network load-balanced remote clusters.

Obtaining Information about Local Computer Network Configuration and Usage

Using classes in the System.Net.NetworkInformation namespace, applications can access IP, IPv4, IPv6, TCP, and UDP network traffic statistics. Applications can also view address and configuration information for the local computer’s network adapters. This information is similar to the information returned by the Ipconfig.exe command-line tool.

Ping

The Ping class allows an application to determine whether a remote computer is accessible over the network. This class provides functionality similar to the Ping.exe command-line tool, and supports synchronous and asynchronous calls.

Processing HTTP Requests from within Applications

You can use the HttpListener class, you can create a simple Web server that responds to HTTP requests. The Web server is active for the lifetime of the HttpListener object and runs within your application with your application's permissions. This class is available only on computers running the Windows XP Service Pack 2 or Windows Server 2003 operating systems.

Programmatic Control of Caching

Using the classes in the System.Net.Cache namespace, applications can control the caching of resources obtained using the WebRequest, WebResponse, and WebClient classes. You can use the predefined cache policies provided by the .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.

Security Exceptions

The System.Security.SecurityException class has been expanded to provide additional data that facilitates investigation into the cause of security exceptions. New properties provide information that includes the method in which the exception occurred, the first permission that failed, the zone or URL of the assembly, the security action that failed, and the security action on the call stack, such as Deny or PermitOnly, that caused the exception.

Serial I/O Device Support

The new SerialPort class provides applications with the ability to access the serial ports on a computer, and to communicate with serial I/O devices.

Serialization

The BinaryFormatter class now supports version-tolerant serialization, which allows a type to be deserialized from the serialization of a different version.

XML serialization now supports the use of properties instead of fields to represent schema elements, the serialization of generic types, and the use of the Nullable!1 structure to represent nullable elements. The IXmlSerializable interface supports custom schema generation.

The new XML Serializer Generator (Sgen.exe) allows you to precompile the code used by Web services clients to serialize transmitted information, greatly improving the client startup time.

SMTP Support

Using the classes in the System.Net.Mail and System.Net.Mime namespaces, applications can send e-mail to one or more recipients. Mail can be sent with alternate views and can include attachments. Sending carbon copies and blind carbon copies is also supported.

Strongly-Typed Resource Support

The Resource File Generator (Resgen.exe) tool creates resource files that are embedded in executable files and satellite assemblies. The Resgen tool produces a wrapper class for each resource file, which gives the developer easy access to resources and prevents spelling mistakes in resource names.

Threading Improvements

Developers can now name cross-process communication events that are created purely in managed code. Also, the Semaphore class supports specialized resource counting.

Trace Data Filtering

The .NET Framework 2.0 Beta provides classes that trace and log system events related to I/O, application startup and shutdown, and so on. However, the enormous volume and diverse types of trace information make it difficult for users to analyze this data. New support for trace data filtering enables the user to specify the type of information to be logged.

Transactions

The new System.Transactions namespace contains classes that allow your applications to participate in transactions managed by the Microsoft Distributed Transaction Coordinator (DTC) or other transaction managers. You can use the TransactionScope class to create simple, transactional code blocks, or the ITransaction and IEnlistmentNotification interfaces to maintain participation through each phase of a multiple-phase distributed transaction. This transaction infrastructure can easily interoperate with the existing System.EnterpriseServices (COM+) transaction infrastructure. A new LightweightTransactionManager class provides a faster alternative to the DTC for simple transactions.

Web Services

Web services support SOAP 1.2 and the WS-I Basic Profile 1.0, which is documented at http://www.ws-i.org/Profiles/Basic/2003-08/BasicProfile-1.0a.html.

When consuming two or more Web services that define a shared type, the client proxies generated for those Web services share the corresponding type on the client. This allows clients to easily pass instances of shared types among Web services.

You can now invoke Web methods asynchronously using an event-based programming pattern.

本来这个应该放在转贴区,但是,我希望更多人能看到。
原文地址:http://blogs.msdn.com/junfeng/archive/2004/08/01/203813.aspx

posted @ 2004-08-02 09:42  朱永光  阅读(1202)  评论(1编辑  收藏  举报