How to migrate applications from ASP.net 1.1 to asp.net 2.0

Source: Internet
Author: User
Tags new features versions visual studio
Asp.net| Program

The launch of the new version of the platform has always been accompanied by a lot of pressure, and people's excitement about the long-awaited function. Developers like to use new technologies to build applications, but there are always some difficulties in porting existing, reliable applications from the old version to the latest and most sophisticated versions.

This week, I'm going to discuss some of the issues that might arise in porting the network application built in ASP.net 1.1 to version 2.0.

asp.net 2.0

The new version of ASP.net 2.0 is not just an upgrade-it's a major technical update because it changes the way asp.net applications are designed, compiled, and configured. Microsoft realizes that there are still a large number of ASP.net 1.1 programs, so 2.0 is designed to allow legacy applications to run without fail. Technology upgrades, on the other hand, have also created the need to transform existing applications to 2.0 platforms. In view of the above, let's discuss the differences between the two versions and the problems that might be encountered during the conversion process.

Version changes

Although ASP.net 2.0 has made many changes to 1.1, some changes have a significant impact on project conversions. The following list briefly outlines some of the major changes:

    • code-behind mode : asp.net 2.0 introduces the concepts of some classes, and a class can span multiple class files. This is a major feature of the Visual Studio 2005 application that separates system-generated code from user code. This prevents you from encountering system-generated code while reading the source code. Section classification reduces the risk of unintentionally editing system code and resulting in smaller code-behind files.
    • directory : asp.net 2.0 adds a number of special directories, while 1.1 only has a necessary bin directory. Most of these new directories are prefixed with APP_, such as the App_Code, App_date, App_ globeresources, and App_localresources,bin directories still exist with a topic directory. The new catalog is the main tool for canceling project files in 2.0.
    • Delete project file : asp.net with Visual Studio 2005 the days of working with project files are gone. The project now becomes a complete network project directory, which is very different from 1.1 and may cause the migration issues mentioned later.
    • compile mode : In 1.1, all code is compiled into a collection in the Bin directory. In 2.0, this set is divided into several sets. These collections can be set up at idle time, or precompiled. Each asp.net directory, such as App_Code and App_Data, and Web Forms, User controls, and so on, have their own collections. This is a major change in the structure of the application, which provides more configuration options for delivering applications to users.
    • application Configuration : The 1.1 version of the application configuration is quite simple, you just move the content file and the necessary collection files, and then copy and paste it can be completed, and there is little room for choice. 2.0 provides a variety of options for application configuration. For example, you can choose to precompile the code before you configure it, or use other methods without precompiling. In addition, you can lock the configured content files to prevent modification after configuration (this is very different from 1.1).

The table above details the major differences between ASP.net 1.1 and 2.0, and their possible impact on application porting. Let us now discuss the possible problems further.

Application Conversion

The main differences between the old and new versions described in the previous section provide clues to the problems that may be encountered when converting applications. The following table highlights the issues to be aware of when porting an application to the new ASP.net 2.0 platform:

    • Before you convert, you must make sure that the application works correctly in 1.1. In a multipurpose project, you should make a backup before converting.
    • The project file was deleted in 2.0, which is a lot different from 1.1. In 2.0, all references are moved to their own directory. In addition, the Network project folder now becomes a project. Therefore, in 2.0, you need to divide items with multiple addresses in legacy 1.1 into separate projects. These items must be divided before conversion.
    • 2.0 of the new directory structure requires 1.1 of the resources and other components used, you need to transfer them to the new directory.
    • The. NET framework has been upgraded from 1.1 to 2.0, so 2.0 may no longer support some of the features in 1.1, such as classes or their methods and/or properties.

Conversion Wizard

Microsoft also considers project conversion issues. Visual Studio 2005 includes a Transformation wizard to help you with project transformations.

Before you convert, the Visual Studio Conversion Wizard first asks you to back up your existing application (which is a very good idea). Next, it performs the transformation and displays a transformation log after the conversion is complete. The. NET framework features that are replaced or canceled in the new version number are common problems that may occur during the conversion process.

The information in list A indicates that one feature has been replaced by another feature in the new version, so I have to modify the code manually. Different applications may have a variety of problems during the conversion process. You need to solve every problem individually and make the necessary changes to make the most of the 2.0 platforms.

Gradual conversion

Whichever conversion is, it is best to proceed gradually and methodically. There is no need for a quick transition. ASP.net 2.0 adds a lot of new features that make it easy to build powerful solutions, but you have to take these changes into account when you convert legacy asp.net 1.1 applications to a new platform. Remember these changes discussed in this article, using the Transformation Wizard, step-by-step transition to the new platform.

Tony Patton has a wealth of Java, VB, Lotus and XML knowledge, is a professional application developers.



Related Article

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.