. NET Framework support in the Windows operating system

Source: Internet
Author: User
Tags iis prepare require socket versions win32 windows 5 visual studio
Window


. NET Framework Support in the Windows operating system
Hans Verbeeck
Microsoft EMEA

September 2002

Apply to:
Microsoft?. NET Framework
Microsoft? Windows? Operating system

Summary: This article provides information about the version of Microsoft Windows that can install the Microsoft. NET Framework, and also lists the. NET Framework Software requirements and some exceptions to the general platform support. In addition, it explains how to prepare applications that are supported across platforms.

Directory
Supported platforms
. NET Framework Software Requirements
Prepare for Cross-platform support
Appendix

Supported platforms
The. NET Framework can be installed in the platform shown in table 1.

Table 1: Platforms where the. NET Framework can be installed

supports the entire. NET Framework for all. NET Frameworks except Microsoft asp.net
Windows 2000 (all versions-no Service packs are required)
Windows Professional SE Windows XP
Windows ME
Windows NT 4.0 (all versions-requires Service Pack 6a)
Windows XP Home Edition

The first thing to note is that the. NET Framework cannot be run on Windows 95, as with other Microsoft Windows 95-less support. Products, such as Microsoft? Office XP) is consistent.

Operating systems that can run the. NET Framework can be grouped into two groups: one that can run the. NET Framework and ASP. NET, and the other set to run only the. NET Framework. This grouping can also be used to differentiate between the operating systems that are available as. NET application servers and those that can only be used as clients running. NET applications. Note that all versions of Windows NT 4.0 (even the Server version) should be treated as client operating systems for. NET applications.

In addition to ASP. NET, the. NET Framework on different platforms supports only a small number of features. For example, Windows 98 and Windows ME do not have an event logging system, so the. NET Framework installed on these systems does not support Eventlog and its associated objects in the System.Diagnostics namespace.

Some differences can also be found in XML Enterprise Services. Windows NT 4.0 support installs Microsoft? Transaction Server (MTS), which is different from COM + 1.5 that shipped with COM + 1.0 or Windows XP that is included with Windows 2000. XML Enterprise Services in the. NET Framework can only be associated with COM + 1.0 or later, the functionality provided by the System.EnterpriseServices namespace is not available at all in Windows NT 4.0 and is only partially available in Windows 2000.

The Appendix provides a comprehensive overview of these distinctions, while preparing the Cross-platform Support Section explains how to enable applications to handle these differences.

. NET Framework Software Requirements
Internet Explorer 5.01
The. NET Framework and the basic common language runtime contain elements that depend on technologies that are implemented by a version of Internet Explorer. These elements include code download capabilities, encryption techniques, and intranet/internet area detection. These technical requirements, as well as the fact that Microsoft Internet Explorer 5.01 has been widely deployed, determine that this version is set to the minimum version required to install and run the. NET Framework.

Table 2 shows that you must have Internet Explorer 5.01 installed in Windows 98, Windows? SE, and Windows NT 4 before you install the. NET Framework. Windows ME, Windows 2000, or Windows XP operating systems already contain Internet Explorer 5.01 or later, so no additional action is required.

Table 2: Installation Requirements

Require platform installation to operate the default version of Internet Explorer
IE 5.01 Windows 98 install IE 4.01 separately
IE 5.00 is installed by Windows 5.01 SE separately
IE 5.01 Windows NT4 install IE 4.01 separately
IE 5.01 Windows ME without installing IE 5.50 separately
IE 5.01 Windows 2000 without installing IE 5.01 separately
IE 5.01 Windows XP requires no separate installation of IE 6.00

Click here to get Internet Explorer 6.0 (English).

MDAC 2.6
Microsoft? Data Access Components (MDAC) have been used by Microsoft to publish methods for implementing common data access paradigm technologies. MDAC can be downloaded and installed separately or with the operating system or other software, such as Microsoft? SQL Server?, Office XP, or other applications that include the component in Setup.

To function properly, system.data the functionality in the namespace (that is, Microsoft? Ado. NET) requires MDAC 2.6 or later on the system. The full version number of the Run-time check is MDAC 2.6.6526.

When you install the Framework on a valid server operating system that is considered to be a. NET application (any Windows 2000 version or Windows XP Professional), Setup warns you if no MDAC 2.7 or later version is available. You can ignore this warning because it does not interrupt the installation. Figure 1 shows such a warning.

Figure 1: Setup Warning

When the. NET Framework is installed on other operating systems (Windows 98, Windows ME, and Windows NT 4.0), no warning is issued even if MDAC is not available, although MDAC is also required for ado.net to function properly in these systems.

Therefore, this means that when you install the. NET Framework on Windows 2000 or Windows XP Professional, Setup checks for versions (2.7) that are different from the version (2.6.6526) that you need at run time.

To obtain MDAC, go to the Universal Data Access Web site.

Other requirements
When you install the. NET Framework on Windows 2000, a warning message is issued if the Internet information Server 5 (IIS 5) is not installed, and is installed on Windows XP Professional , the system also issues a warning message if there are no IIS 5.1 available. Setup does not check for IIS because the asp.net is not supported by other operating systems.

When you write code that uses Windows Management Instrumentation (WMI) events and classes, the. NET application uses the System.Management namespace. If WMI is not supported by the operating system, the functionality in that namespace will not work.

PlatformNotSupportedException
Some parts of the. NET Framework require some software components, but this does not prevent installation. If the components that are required at run time are not available, the. NET Framework throws a PlatformNotSupportedException type exception that instructs your application to prepare a component of that type. More content will be covered in the next section.

Prepare for Cross-platform support
From the beginning of the. NET Framework design, support across multiple platforms has been a design requirement. Therefore, the many important propositions that the. NET Framework provides are derived from the ability to enable developers to write applications that run across multiple platforms. In general, the. NET Framework classes are limited only by one factor, that is, the common language runtime should exist on the underlying platform.

In general, there are exceptions to similar generalizations, and the main reason for this is to make these exceptions clearer. Therefore, when designing a managed class, you should always consider portability between the supported platforms. To ensure portability between platforms supported by the. NET Framework, it is a good idea to use other managed code classes already provided in the. NET Framework to generate classes. Whenever you create a. NET class that invokes the local API, the risk of a platform that does not support formal support increases.

Because the. NET Framework is a new technology, the new class might have call Win32? Or the legitimate needs of other local APIs, but to implement this call, there is a deep understanding of the balance made and the impact of the decision on platform support. For this reason, important issues to be considered are:

Is it really necessary to call this unmanaged API (via P/invoke)?
Is there a class in the. NET Framework that encapsulates the API?
If the technology requires some data about the underlying system, can you use the System.Management layer instead of getting it by invoking the local API?
If you do need to invoke the Win32 native API, can you invoke a Cross-platform-supported API instead of invoking an "Ex" method that might limit the ability to run on the underlying platform?
Because the operating system layer under the. NET Framework evolves with the release of the new version, the. NET class may need to rely on the underlying operating system technology that is not available in all supported operating systems. In this case, the Class designer needs to compare the cost of supporting the class across all platforms with the benefits that the target customer has gained in implementing the feature in each underlying operating system. If possible, the class should provide equivalent functionality on the underlying platform or provide a subset of that functionality on these platforms. In the absence of certain parts of the underlying operating system, such as IIS, where the class cannot work, the class should not be installed on that platform, or the class should check the underlying dependencies and cause platformnotsupportedexception when the dependency is not available.

Suppose an application that attempts to create a managed socket object calls the Socket constructor on an operating system that does not have Winsock installed. The following exception will be thrown.

"Platformnotsupportedexception:socket cannot is created due to a missing required" platform, component Winsock "(1.1 Rmnotsupportedexception: Unable to create socket due to lack of required platform component Winsock 1.1

When using managed classes in namespaces that are mentioned in the appendix, it is a good idea to add code to handle platformnotsupportedexception.

Consider an application in which you want to record specific events. If the application requires running on Windows 2000 or Windows 98, you need to consider writing the event to the event log in Windows 2000 and writing the event to a text file in Windows 98. You can check the appendix to see which operating systems support the EventLog object in the System.Diagnostics namespace. The following code shows how to write to the event log when the object is supported, and how to write to a normal text file when the object is not supported.

Try
Dim Objeventlog as New EventLog ("Application", ".", "MyApp")
Objeventlog.writeentry ("Application Started")
Catch ex as PlatformNotSupportedException
' For Windows 98 or Windows ME

Dim sfile as String = "App.log"
Dim SR as System.IO.StreamWriter

If not System.IO.File.Exists (sfile) Then
sr = System.IO.File.CreateText (sfile)
Else
sr = System.IO.File.AppendText (sfile)
End If

Sr. WriteLine ("Application Started")
Sr. Close ()

Catch ex as Exception
MessageBox.Show ("Cannot perform an action")
End Try
Further notes
For more information about the. NET Compact Framework (versions that are running on smart devices), visit Visual Studio. NET (English) Web site.




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.