What's new in the .NET Framework 2.0 Beta

xiaoxiao2021-03-06  123

The .NET Framework version 2.0 Beta extends the .NET Framework version 1.1 with new features, improvements to existing features, and enhancements to the documentation. This section provides information about some key additions and modifications.

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.

ADO.NET

New features in ADO.NET include support for user-defined types (UDT); asynchronous database operations; XML data types; large value types; snapshot isolation; and new attributes that allow applications to support multiple active result sets (MARS) with SQL Server 2005. For more information about these and other new ado.net Features, See

What's new in ado.net

.

ASP.NET

The Microsoft .NET Framework 2.0 Beta includes significant enhancements to all areas of ASP.NET. For Web page development, new controls make it easier to add commonly used functionality to dynamic Web pages. New data controls make it possible to display and edit data on an ASP.NET Web page without writing code. An improved code-behind model makes developing ASP.NET pages easier and more robust. Caching features include several new ways to cache pages, including the ability to build cache dependency on tables in a SQL Server database.You can now customize Web sites and pages in a variety of ways. Profile properties enable ASP.NET to track property values ​​for individual users automatically. Using Web Parts, you can create pages that users can customize themselves in the browser. you can Automatically TRACK Page Views and Control Clicks with site statistics, and you can add navigation menus using Simple controls.

Improvements to Web site features allow you to create professional Web sites faster and more easily. Master pages allow you to create a consistent layout for all the pages in a site, and themes allow you to define a consistent look for controls and static text. To help protect your sites, you can precompile a Web site to produce executable code from source files (both code files and the markup in .aspx pages). you can then deploy the resulting output, which does not include any source information, to a production Server. Enhancements to ASP.NET Also include New Tools and class to make Web Site Management Easier for Web Site Developers, Server Administrators, And Hosters.

. ASP.NET accommodates a wide variety of browsers and devices By default, controls render output that is compatible with XHTML 1.1 standards The new adaptive rendering architecture enables controls to automatically render the correct markup for a specific browser or device;. You no longer need to use separate classes for mobile development. You can use device filtering to specify different property values ​​on the same control for different browsers, and ASP.NET includes special controls specifically designed for creating pages that run on small-form browsers and mobile phones.For A More Complete List of New Features in ASP.NET, SEE

What's new in asp.net

.

Authenticated streams

Applications CAN Use the New

NegotiaTREAM

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 Addep

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. .

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 .

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.

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 assembly, a developer useped thedemandchoice

SECURITY ACTION CAN NOW DEMAND STRON NAME IDentities, Any Of Which Will Allow The Stack Walk To successd. 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 specificy parameters instead of specificipes.

System namespace

and

System.collections.Generic

Provide Generic class and methods. The new system.collections.Generic Namespace Provides Support for strongly type collections. system.null

. 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

{...}

),

GetGenericparameters

To Obtain Type Parameter Lists, And

BindGenericparameters

To create Specific Types, for example, new gen

()

.

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 can not 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 of 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 classs. It is now easier for users to read and write text files and ketain information about a driving.

Developers Can Now Use the classes in the

System.io.compression

.

Manifest-based ActiVation

This feature provides new support for loading and activating applications through the use of a manifest. Manifest-based activation is essential for supporting ClickOnce applications. Traditionally, applications are activated through a reference to an assembly that contains the application's entry point. Clicking on an application's . EXE FILE, Cause, Causes the shell to load the commitness runtime (CLR) and call a welcome .exe file's assembly .exe file's assembly.

The manifest-based activation model uses an application manifest for activation rather than an assembly. A manifest fully describes the application, its dependencies, security requirements and so forth. The manifest model has several advantages over the assembly-based activation model, especially for Web applications. For example, the manifest contains the security requirements of the application, which enables the user to decide whether to allow the application to execute before downloading the code. The manifest also contains information about the application dependencies.Manifest-based activation is provided by A Set of Apis That Allow "Managed Hosts" to Activate Applications and add-inscribed by a manifest. these Apis Contain A MIXTURE OF Both New Classes and extensions to existing classes.

This Activation Model Also Invokes An Entity Called A Trust Manager Whose Role Is To Perform The Following Tasks:

.NET Framework Remoting

.NET Framework Remoting Now Supports IPv6 Addresses and The Exchange of Generic Types. The elses 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 cove

You can use the 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.

Programming languages

Four Microsoft Programming Languages ​​Explicitly Target The .NET Framework. For more information about new and enhanced Features in these Languages, See The Following Topics:

What's new in c # 2.0

What's new in the visual j # language

What's new in the Microsoft C / C Language

What's new in the Visual Basic Languagevisual Basic Compiler and Language

Language Improvements in Visual Basic Simplify 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. This Version Has The Value of VBC_VER 8.0.

The Visual Basic command-line compiler now stores the default command-line options in the Vbc.rsp file, in the same directory as the command-line compiler, Vbc.exe. You can edit Vbc.rsp to reconfigure the default command-line Options.

There Are Four New Command-Line Compiler Options:

THE

/ DOC

Option generates an XML Documentation File Based on Comments Wtem Code. The

/ noconfig

Option Causes the compiler to ignore the vbc.rsp file. The

/ codepage

Option Specifies Which CodePage To Use When Opening Source Files. The

/ FileAlign

Option specifies the size of sections in your output file.

For more information, see

Visual Basic Compiler Options

.

Language

There Are Several New Elements in this Version of The Visual Basic Language:

Continue Statement

Operator Statement

USING Statement

Isfalse Operator

Isnot Operator

Istrue Operator

Sbyte Data Type

UINTEGER DATA TYPE

Ulong Data Type

Ushort Data Type

Expands

Global

Of

Narrowing

Widening

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 Reperest 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

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 Support.

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 improversion

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 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-10a.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.

Windows Forms-Related Features

Clickonce Deployment

ClickOnce deployment allows you to deploy self-updating Windows applications that can be installed and run as easily as Web applications. You can deploy Windows client and command line applications. There are new Publish Project commands on the Build and Project menus in Visual Studio. For More Information, See

Clickonce Deployment overview

.

Application settings

Application settings for Windows Forms makes it easy to create, store, and maintain custom application and user preferences on the client. With Windows Forms settings, you can store not only application data such as database connection strings, but also user-specific data, such As Toolbar Positions and Most-Recently-Used Lists. for more information, see

Application settings overview

.

New Data-Binding Model

THE

DataConnector

component simplifies the process of data-binding because it acts as an intermediary between the bound control and the target data source. It automatically manages many of the more difficult binding issues such as currency, data-related events, and target data-source changes. IT is also designed to interoperate with other data-related Windows Forms Controls, Particularly THE

Datanavigator

And the

DataGridView

Controls. for more information, see

DataConnector Component

. The DataConnector component was designed to simplify the process of binding controls to an underlying data source. It acts as both a conduit and a data source to which other controls bind.New Windows Forms Controls

The DataGridView control provides a powerful and flexible way to display data in a tabular format. It can be used to show read-only views of a small amount of data, or it can be scaled to show editable views of very large sets of data. THE DATA CAN RESIDE IN EXTERNAL DATA SOURCE ORBE ADDED DIRECTLY to THE Control. For more information, see

DataGridView Control Overview

.

Toolstrip

controls are toolbars that can host menus, controls, and user controls in your Windows Forms applications. The ToolStrip and its associated classes enable you to create toolbars and other user interface elements in a style that is consistent with Microsoft Windows? XP, Microsoft Office, Microsoft Internet Explorer, or Can Be Customized. For more information, see

Toolstrip Control overview

.

THE

MaskedTextBox

Control Uses a Mask Definition to Distinguish Between Valid and Invalid User Input. for more information, see

MaskedTextBox Control

.

The Windows Forms

SoundPlayer

component enables you to easily include sounds in your applications. The SoundPlayer component can play sound files in the .wav format, either from a resource or from Universal Naming Conventions (UNC) or HTTP locations. Additionally, the SoundPlayer component enables you to load or Play Sounds asynchronously. for more information see

SoundPlayer Component

.

The Windows Forms

Splitcontainer

control can be thought of as a composite;.. it is two panels separated by a movable bar When the mouse pointer hovers over the bar, the cursor changes to show that the bar is movable Use this control to create complex, resizable user interfaces that Are Effective for Displaying and Browsing Information. for More Information SEESPLITCONTAINER CONTROL

.

THE

Listview

Control Now supports three features provided by Windows XP and the Windows Server 2003 Family: Tile View, Grouping, and Drag-and-Drop Item Repositioning.

THE

ActiveDocumenthost

control lets you display active documents such as Microsoft Office documents in your Windows Forms applications. Active documents are documents designed to allow hosting in other documents or applications. Active documents are initially displayed in a static, read-only state, but can be activated in Place to allow user editing. for more information, see

ActiveDocumentHost Control overview

.

THE

Webbrowser

control lets you host Web pages in your Windows Forms applications. You can use the WebBrowser control to provide integrated HTML-based Help or Internet Web browsing capabilities in your application. Additionally, you can use the WebBrowser control to convert existing Web applications to client applications That Seamless INTEGRATE DYNAMIC HTML (DHTML) Code with The User Interface Capabilities of Windows Forms. for more information, see

Webbrowser Control overview

.

THE

FlowLayOutpaner

Control Arranges ITS Contents in a Horizontal or Vertical Flow Direction. The

TableLayoutpanel

control arranges its contents in a grid. Because the layout is performed both at design time and run time, it can change dynamically as the application environment changes. For more information, seeFlowLayoutPanel Control Overview

and

TableLayoutpanel Control overview

.

THE

Backgroundworker

Component Enables you to perform Operations in The Background That Can take a long time to execute, such as image downloads and database. for more information see

BackgroundWorker Component Overview

.

The Asynchronous Pattern for Components is an event-driven model that makes available the advantages of multithreaded applications while hiding many of the complex issues inherent in multithreaded design. For more information, see

Asynchronous Pattern for Components

.

XML-Related Features

The .NET Framework 2.0 Beta includes support for the XQuery language, a new XML data store, and a mapping technology that allows you to map data that is stored in a relational database to an XML view, or a common language runtime (CLR) object View. in adduion, there is all existing XML-Related Classes include

XmlReader

,

XMLWriter

, and

Xpathnavigator

Classes, A New Model for Creating Xmlreader and XMLWriter Objects, A New XSL Transformation (XSLT) Processor, And Performance Improvements. for more information, see

What's new in system.xml

.

转载请注明原文地址:https://www.9cbs.com/read-125862.html

New Post(0)