Microsoft .NET Framework FAQ (1)

xiaoxiao2021-03-06  42

Microsoft .NET Framework FAQ (1) (www.jojoo.net) 2001-3-27 (Please double-click the automatic scroll to watch, click Stop, then hit ..)

Microsoft .NET framework is common problem

Microsoft Corporation

Conceptual problem what is .NET? Simply put, Microsoft® .NET is a policy that Microsoft submits software in a service manner. For complete information, see White Paper on this topic (English).

The following is a summary of the white paper, briefly introduce the key content of .NET:

Microsoft .NET platforms include .NET infrastructure and tools for creating and operating a new generation of services, for implementing multi-information clients .NET user experience, and .NET construction block services for enabling a new generation of smart Internet devices. NET equipment software.

Microsoft .NET products and services include Microsoft® Windows.net (its core integration a set of construction block services), MSN.NET, personal subscription service, Microsoft® Office.Net, Microsoft® Visual Studio.NET, and Microsoft® BcentralTM for .NET.

Third-party .NET services Many partners and developers have the opportunity to provide companies and vertical services on the .NET platform. This issue is for .NET framework. The .NET framework is part of the .NET platform infrastructure. See the next question for more information on the .NET framework.

What is .NET framework? The .NET framework is an environment created, deployed, and running web services and other applications. It consists of three main parts: time, framework and ASP.NET.

Is the .NET framework only applies to the user who creates a Web site? The .NET Framework allows you to create an excellent web application. But it can also help you create a variety of applications. Compared to the way the application is currently created, .NET has a greater advantage in writing any Windows software (using ATL / COM, MFC, Microsoft® Visual Basic® or Standard Microsoft® Win32®). Of course, if you are developing a Web site, starting from ASP.NET, you will feel the powerful attraction of the .NET framework.

Where can I get the .NET framework SDK? You can now download the Beta 1 version of the .NET Framework SDK from MSDN Online Downloads (English). In view of its size, we offer this Beta version in a variety of ways: as a download file (106 MB), divided into 11 sections, or order its CD from the Microsoft Developer Store:

USA / Canada (English)

International (English)

Which platforms can the .NET framework run? The Beta 1 version can run on Microsoft® Windows® 2000, Windows 95/98 / ME, and Windows NT® 4.0.

In addition, there is a .NET framework called .NET streamlined frame. It is used to make cellular phones and enhanced televisions and other features of the .NET framework. The .NET streamlined frame will run on a Windows CE and other embedded operating systems.

What programming languages ​​supported by .NET framework? The .NET framework is independent of the programming language. In fact, any language can support the .NET framework. Currently, you can create .NET programs, including: C , Microsoft® Visual Basic.NET, JScript®, and Microsoft's latest language - C #. There will be a large number of third-party languages ​​can be used to create .NET framework applications, including Cobol, Eiffel, Perl, Python, SmallTalk, and more. What is the relationship between .NET framework and COM services? In the .NET framework, not only you can access the COM service, but also easier to create service components.

The .NET Framework component can be added to the COM application. In the COM application, .NET Framework components can utilize automatic component services, such as transactions, object pools, queuing components, events, and more.

What is the relationship between .NET framework and DCOM? DCOM is a COM infrastructure for inter-process communication. The .NET Framework supports a large number of plug-in channels and formatting programs for inter-process communication. When converting between managed code and non-hosting code, the .NET framework uses a COM infrastructure, especially DCOM. All schemes that use COM services use managed to unmanaged conversion, so DCOM is used by default. For inter-interoperability communication, .NET framework also supports SOAP (Simple Object Access Protocol).

Is the .NET framework is just a new name for Windows DNA? Do not. Windows DNA is an architecture for creating a tightly coupled distributed web applications. Since distributed applications require more loose coupling principle, Microsoft has developed the architecture in .NET. The .NET frame is part of the .NET architecture.

Runtime technical problems Terminology What is the public language runtime (CLR)? The public language is running the .NET Framework application execution engine.

It provides a number of services, including:

Code management (loading and execution)

Application memory isolation

Type security verification

IL to the transformation of the machine code

Metadata (Enhanced Type Information) Access

Manage memory for managed objects

Compulsory code access security

Abnormal processing, including cross-language abnormalities

Interoperability between hosted code, COM object, and existing DLL (unmanaged code, and data)

Automatic object layout

Support for developers (configuration, commissioning, etc.)

What is a public type system (CTS)? The public type system is a multi-information type system, which is built into public language runtime, supports the types and operations in most programming languages. Public Type Systems support a full implementation of a large number of programming languages.

What is the Public Language Normative (CLS)? Public language norms are a set of structures and restrictions, used as a guide to library writers and compiler. It makes any language that supports CLS fully uses the library, and these languages ​​can be integrated with each other. The public language norm is a subset of public types. For applications developers who need to write code for other developers, the public language specification is also very important. If developers follow CLS rules to design public access API, you can easily use these APIs in any other programming language that supports the runtime of public language.

What is Microsoft Intermediate Language (MSIL)? MSIL is an instruction set that is not related to the CPU. The .NET framework program is compiled into MSIL. It contains instructions that load, store, initialize, and call the object method.

Combined with metadata and public types, MSIL allows real cross-language integration.

MSIL is converted to machine code before execution instead of explaining one side.

What is managed code and managed data? The hosting code is written as code to support the public language runtime service (see "What is the public language runtime?"). In order to support these services, the code must provide minimum level information (metadata) to the runtime. By default, all C #, Visual Basic.Net and JScript.net code are managed code. Visual Studio.NET C code is not hosting code by default, but by specifying a command line switch (/ CLR), the compiler can also generate a managed code. It is closely related to the hosted code. The hosted data is data that is allocated and released by the garbage collector during the public language. By default, C #, Visual Basic and JScript.net data are managed data. However, by using a special keyword, C # data can be marked as unmanaged data. Visual Studio.NET C data is non-managed data by default (even when using the / CLR switch), but when using C hosted, you can use the "__gc" key to mark the class as a hosted class. As is shown in the name, it represents the memory of the class instance by garbage collector. In addition, this class is also a member of the .NET framework, and has the benefits and restrictions thereof. An example of the benefit is that it can correct interoperability with the classes written in other languages ​​(such as inheriting from Visual Basic class); one example of the restriction is: The hosted class can only be inherited from one base class.

What is the assembly? The assembly is the main construction block of the .NET framework application. It is a single implementation unit (including one or more files) to create, identify, and deployment. All managed types and resources can be marked as accessible only within its actual unit, or marked as a code that can be enabled by the unit.

The assembly is self-description by a list. The list is an indispensable component of each assembly. List:

Establish an assembly ID (in the format of the text name), version, category, and digital signature (if you want to share the assembly between the application).

Define files that make up the assembly implementation (through name and file hashing).

Specify the type and resources of the set assembly, including which are exported from the program.

Record the dependency of other assemblies by recording compile.

Specifies the collection of permissions required to run the assembly correctly. This information is used to resolve reference, enforce version binding strategies, and the integrity of the assembly loaded loaded. Because each type is loaded into the context of the assembly, you can determine and locate the assembly of any running objects when runtime. The assembly is also a unit that applies code access security privileges. When determining which privileges are granted, the identification evidence of each assembly is considered to be independent.

The self-description feature of the assembly also helps achieve no impact installation and XCOPY deployment.

What is a special assembly and shared assembly? The dedicated assembly is only used by a single application and stored in the installation directory of the application (or in its subdirectory). The shared assembly is a set of assemblies that can be referenced by multiple applications. To share an assembly, the assembly must be created for this purpose, which can be implemented by assigning an encrypted reinforced name (used as a shared name). Conversely, the dedicated assembly name only requires unique in the application that uses it.

By distinguishing between dedicated and sharing assemblies, we introduce the key points that clearly determine the sharing. Simply simply deploy the private assembly in the application directory, make sure the application is only running in that section created and deployed. References to private apps are only parsed within the dedicated application directory.

Selecting to create and use shared assemblies for a variety of reasons, such as the ability to express version strategies. The shared assembly has an encrypted enhanced name, which means that only the author set has a key to generate a new version of the assembly. Therefore, if you make a policy declaration, you want to accept the new version of the assembly, you can confirm that the version update will be controlled and verified by the author. Otherwise, you will not accept them. For applications installed locally, shared assemblies are often explicitly installed in the global program cache (the local cache of the assembly is maintained by .NET framework). The key to the version of the .NET framework is the key to the downloaded code does not affect the execution of the application where the local installation is. The downloaded code is placed in a special download cache, even if some download components are compiled into shared assemblies, they cannot use these code on the machine.

The classes published with the .NET framework are compiled into a shared assembly.

If I want to create a shared assembly, do you need additional overhead in terms of tag and management key? Creating a shared assembly does involve work in encryption keys. When you create an assembly, only the public key is necessary. Support the compiler of the .NET framework to provide command line options (or use custom properties) to provide public keys when creating an assembly. A commonly used public key is typically retained in the resource database, and the compilation script points to this key. Before the publish assembly, you must use the appropriate private key to fully mark it. This is done by the SDK tool sn.exe (enhanced name).

The enhanced name tag is not like Authenticode. It does not involve a third party organization, does not need to pay, and is not subject to certificate. In addition, the extra overhead of the enhanced name is much smaller than the cost of verifying Authenticode. However, the enhanced name does not generate any statement trust a publisher. The enhanced name allows you to confirm that the content of the given assembly is not tampered, the assembly that is loaded at runtime comes from the publisher of your development. But it does not generate a statement about whether to trust the identity of the publisher.

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

New Post(0)