You are on page 1of 14

solutions for success

Hanu Software

ASP to ASP.NET Migration


Migration from ASP to ASP.NET can drastically improve the performance of your applications. A software created using ASP.NET is more robust, scalable, reliable, and secure as compared to the software created using ASP. ASP.NET, which is a new version of ASP, removes all the shortcomings of ASP. For example, it removes tier confusion from the code (by providing an easy way to separate presentation layer, business logic layer; and database layer), It allows code compilation instead of code interpretation, and provides CLR (Common Language Runtime) for built in garbage collection to avoid memory leaks. ASP.NET, which uses .NET Framework, enables you to build globally distributed applications with Internet functionality and interoperability built into them. ASP.NET enables you to build platform independent software that can be easily integrated with any application developed on any platform and language that supports CLR. The .NET platforms now support approximately 25.NET compatible languages as compared to ASP, which can support only two scripting languages such as VB Script and JavaScript. ASP to ASP.NET migration can open a whole new world of possibilities for your web-based applications. For example, you can make use of already existing XML web services in your code to add a new feature or functionality to your code. XML Web services can be utility programs created by any developer and can be made available through Internet world wide without worrying about the operating system and programming language used to create them. Consider a situation where you want to validate the credit card number of your online customers on your website. Instead of writing the code to validate the credit card numbers of the customers yourself, you can simply plug in the already available Web service providing credit card validation in your code. In addition, the ASP.NET migration can make the code of your application considerably small, easily manageable, and easily deployable. This white paper discusses the benefits that you may get, after the migration of your application from ASP to ASP.NET with the help of Hanu Software. It provides all the valuable information in understanding the important aspects of migration from ASP to ASP.NET and provides a clear insight into the b?enefits of proposed migration. This paper enables you to understand the complexities in migration and how Hanu Software enables a smooth .NET migration of your ASP code by providing you the best .NET migration solution. Further this paper discusses about the facts that you must consider before going for a migration and various migration strategies that Hanu Software offers.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Migration from ASP to ASP.NET with Hanu Software

ASP to ASP.NET Migration

solutions for success

Hanu Software

Benefits of ASP to ASP.NET Migration


Microsoft's .NET Framework is rapidly gaining momentum as a standard for business systems, both within an organization and for the external clients of an organization. The advantages of migration of your existing applications to ASP.NET are enormous and disadvantages are none. This is because all the features of asp are available in ASP.NET. Installing ASP.NET does not break your existing ASP applications. ASP.NET uses a separate file name extension (.aspx instead of .asp), separate configuration settings, and an entirely separate runtime technology. With an ASP application entire web server may go down if one application crashes but ASP.NET processes run in a different server space and in separate application domain. This saves entire web server to crash just because of one application. If ASP and ASP.NET are installed on the same computer, ASP pages and applications can continue to use the existing ASP engine, with no interference from ASP.NET.

Some other benefits of ASP to ASP.NET Migration are:


Better Language Support: ASP.NET is platform independent technology and supports 25 .NET
languages such as C#, VB.NET, and JavaScript. .NET Developers can visually create Web pages with the use of VB style drag drop feature in Visual Studio.NET IDE. They can use built in debugging, testing and deployment features of .NET platform for easy manageability of code. In addition developers can use over 4500 .NET framework classes that provides a number of controls for performance monitoring, logging, file upload, image generation, XML processing, data access, transactions, regular expressions, message queuing, SMTP mail and much more.

Event-Driven Programming: ASP .NET is an object oriented technology that supports event

driven programming unlike ASP. Objects on a Web page can expose events that can be processed by ASP .NET code. Load, Click and Change events handled by code makes coding much simpler and better organized.

Improved Scalability: ASP.NET has removed the bottlenecks created by ASP sessions, which

used to work well only on the server where they were created. They used to store the session data "in-process" on the web server, which was a cause of scalability bottlenecks on high-volume sites. ASP.NET stores session's data on a dedicated state server that can be easily shared by multiple web servers and on an SQL Server database too, providing a better scalability and availability of sessions. This has improved the server to server communication, making it possible to scale an application over several servers. One example of this is the ability to run XML parsers, XSL transformations and even resource hungry session objects on other servers.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Improved Performance: ASP.NET highly improves the performance of your code because it

uses caching in code with automatic content expiration. This feature automatically expires and refreshes data from the cache. This automatically solves the problems of memory leaks from your application and improves the performance of your application. ASP.NET performs dynamic compiled execution of code, which allows fast retrieval of pages as compared to ASP, which requires each page to be interpreted when it is requested by the client. The dynamic compilation automatically detects changes in the code and stores the compiled code in memory to serve the future requests by the web server.

Easier Configuration and Deployment: ASP.NET use XML (extensible markup language) file

within the application to store application configurations. The configuration files used by ASP.NET applications can be changed and uploaded while the application is running without restarting the server. The web applications are simply copied to the server without the need to run regsvr32 to register any application components and configuration settings.

Easier Code Maintenance: ASP.NET enables easy code maintenance because it separates

presentation layer from business logic layer. Developers with relevant expertise in front end and back end programming can easily maintain code as compared to ASP, where a single file is used to write HTML, VB script, Java script, and ASP code.

Fundamental Changes in Code


Both ASP and ASP.NET can coexist with each other. ASP and ASP.NET applications can run side by side on a server without having adverse affect on each other. Both applications use separate file extensions, configuration models, and processing engines. For example an ASP application uses .asp extension and a .NET application uses .aspx extension. The configurations in ASP is done using registry but ASP.NET uses XML-based configuration files. You can have one part of application running ASP and another part of the same application running ASP.NET. All these features are very beneficial if you need to move a large, rapidly changing site to ASP.NET one piece at a time. The fundamental changes that may occur in the code after migration can be categorized into following categories:

ASP to ASP.NET Migration

solutions for success

Hanu Software

Core API Changes: These changes refer to the changes made to the API method calls while
migration. For example the changes that would occur when you make the calls related to Request, Response, and Server objects. Usually the method of making calls is same but if there are multiple values for a given key for collection objects different method to return the collection of values is used.

Structural Changes: These changes refer to the changes that affect the layout and coding style

of an application. For example ASP.NET pages only support one language on a single page where as ASP allowed multiple languages to be used on a single page. ASP.NET page functions must be declared in <script runat=server> blocks where as in ASP, page functions are declared within <% %> blocks. In ASP.NET, page functions must be declared in <script runat=server> blocks whereas ASP.NET does not support page-render functions.

Visual Basic Language Changes: VB.NET is a complete programming language as compared to


VB Script that was used in ASP. Some of the changes include the removed use of VARIANT data type and Option Explicit. The variable declared with VARIANT data type needs to be transformed to some basic data types. The Option Explicit is made a default feature. Some other keywords such as LET and SET are not supported and Integer values are now 32 bits and Long types have become 64 bits.

COM-Related Changes:

VB.NET code migration does not force you to incorporate any COM-related changes in your code. Most of these changes are back stage changes and are done automatically. Some changes include the change in threading model, early binding and late binding changes, and changes in OnStartPage and OnEndPage methods in the code.

Application Configuration Changes: ASP.NET requires you to store all your configuration
settings in Web.config file, which is available in the main application directory.

State Management Issues: ASP.NET does not require you to change your Session or Application

objects. On the other hand it provides State Management Options for Inproc, StateServer, SqlServer for improved control on your applications. If your application is partially migrated to .NET platform then you cannot share state variables stored in the intrinsic Session or Application objects in your application with .NET pages. You need to duplicate this information in both systems, till the complete migration takes place.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Security-Related Changes: ASP .NET supports Windows, Passport, and Forms-based

authentication, including cookie management and automatic redirecting of unauthorized logins. All these authentication methods were also available in ASP but Passport based authentication in a new feature added to ASP.NET. Unlike ASP, ASP.NET does not do per-request impersonation. It does not allow your code to run on behalf of authenticated user. You can still use your old authentication methods and perform custom user and login checking using other authentication methods.

Data Access: ASP .NET uses ADO .NET, which offers an enormous range of features as compared

to ADO to improve your data access methods. It offers powerful new features to get you data from database. Though you need not make any code changes for migration but you can make use of all ADO.NET features in your code.

Migrating Existing Applications to ASP.NET


Although migration of your existing applications to ASP.Net can be very beneficial, sometimes people are reluctant to make this transition. This may be due to many reasons. One of ASP's great assets is that it allows you to use a very simple scripting language, which is not the case with .NET platform. .NET uses modern, full-featured programming languages. ASP.NET therefore places much greater demands on web developers, compared to those placed on conventional software developers. In ASP, executing the principles of good design is extremely difficult. ASP applications are complex and difficult to maintain, with very low code re-use. On the other hand with .NET there is an opportunity to produce better-designed applications, with resulting benefits in sustaining the quality. However these design skills are new demands on ASP programmers, and have a long and steep learning curve. While it is very much possible to write ASP.NET applications in the ASP style, this will reverse many of the advantages of .NET technology. Developers who have not come from a traditional software development background may require more extensive training to adapt to the new concepts. Even experienced software developers may not have fully used object orientated features previously. There could be performance scaling down and productivity decline while developers get accustomed to .NET.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Facts that you Need to Consider before Migration


Before you go for a migration you must determine the benefits that you expect from the migration and the time that you can afford to spare for the migration process. You must also understand the complexity of migration in your application. If you have a big application with number of modules, the quality of the code, the use of COM components, and the distribution of data access functions in the code are few important factors that must be considered before you go for migration. The greatest difficulty in all programming is good design. If your code has a good design and the multi-tiered separation exists in your application code then the migration process can be smooth else the migration process will be complex and would require a huge amount of effort. A good code design implies that the presentation layer is separated from the business components layers and data access functions reside centrally in data tier

Our Excellence to Provide a Migration Solution Hanu Software


Changing an ASP page's file extension from .asp to .aspx and correcting for some syntactical changes is usually enough to get an ASP page working as an ASP.NET page. Such an approach, although it can be completed quickly, does not take advantage of many of the new features of .NET, including ASP.NET Web controls, Microsoft ADO.NET, the Microsoft .NET Framework classes. At Hanu Software we follow a complete lifecycle of migration and evaluate the complexity of your code and provide a best ASP.NET solution for your ASP code. Hanu Software has a dedicated center of excellence (COE) for the development of applications on .NET platform .The COE team delivers technical excellence through the development of system architectures, applications development capabilities and reusable enterprise components. Our COE team can go through each and every component of your application and can incorporate maximum migration benefits to your application. Hanu Software accomplishes migration by considering each and every pin aspect as an artesian would do for his craft work. At Hanu we refer ASP to ASP.NET migration as the process of making application work exceptionally well.

ASP to ASP.NET Migration

solutions for success

Hanu Software

We Accept Challenges
At Hanu Software, we accept challenges to migrate any ASP application successfully to .NET platform. The application may be simple or complex, after migration, you receive all the benefits of migration of your application. Although the complete migration of a site in one go is possible but Hanu Software believes in modular approach. The decision to go for a modular migration or full fledged migration is based on the size and complexity of the application. The simple and small web sites can be migrated to .NET platform in one go but big, complex, and mission critical business applications must be migrated using modular approach. At the time of suggesting a migration solution we also consider other factors that affect a migration strategy such as the migration goals of a company, complexity and architecture of existing system, budget, and other available resources. Hanu Software believes that a company willing to migrate its application from ASP to ASP.NET must not suffer losses due to the downtime of the business website. The migration process should be smooth and easy going without affecting the business of a company. Hanu Software offers a solution based on planned phases of migrations and enhancements and possesses strong product release management experience to manage old as well as new product versions. Hanu Software simultaneously supports: - Bug fixes for existing ASP system - Development of the new .NET version - Implementation of new features in ASP as well as ASP.NET based system.

Migration Strategies that We Follow


We believe that if a company is going to put forth the effort to move their software to ASP.NET platform then this migration may be a long-term investment for the company. We believe that this can be an opportunity to make as many architectural and design improvements as possible in the existing code. In such a scenario, we believe that a phased approach for migration is must, where both ASP and ASP.NET modules coexist, till complete migration takes place.

ASP to ASP.NET Migration

solutions for success

Hanu Software

We believe that if a company is looking for long-term benefits from the migration then the company can follow the approaches given below:

Co-Existence - In this approach, you can have the ASP and ASP.NET modules existing together.

You can perform migration for a specific functionality of an application and ensure that the migrated module would still interoperate with the existing application. At Hanu, we follow the following co-existence strategies: Migrating Shared Pages: In this approach we select only those pages first that share their code with other pages. These pages are common pages having intensive code processing and the potential for caching. This enables the important and complete sections of the applications to be migrated first. After this migration both ASP and ASP.NET would be running simultaneously and ASP pages will be using ASP.NET code. Migrating New Pages: In this approach we select only those pages, which need to be added to the application for additional functionality. These pages can be entirely new pages or existing pages that require major code changes. This is the most comfortable approach without affecting the existing functionality. This also restricts new bugs to the new pages only. Migrating Entire Tier or Entire Module: In this approach, we either select an entire module for migration or migrate the application tier by tier. This can be done using Horizontal and Vertical migration strategies. Both these migration strategies will be discussed in the next section of this paper.

Build the Roadmap - In this approach, to get long term benefits of migration, you decide to

invest in re-architecting a system so that you can make the best use of .NET framework. The primary objective of this approach is to provide a comprehensive and detailed design for future project developments.

Full Fledged: In this approach you may want a full fledged migration of your system with the

plans for change in application design, development, and deployment. This may be due to some strategic business needs. The two co-existence migration strategies that Hanu Software offers are Vertical and Horizontal Migration. Both these strategies offer a modular approach for migration.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Vertical Migration
Vertical migration refers to migrating an application one tier at a time, as shown in the Figure given below. For example, consider you have a three tier HR application, which consist of three modules, Recruitment, Leaves Management, and Salary Management. The three tiers used by the application include the user interface, business components, and database. Vertical migration approach would proceed through all the pages of the user interface tier for each module, followed by the business component and data interface tiers, as shown in the figure given below:

The vertical migration is most appropriate when the application's modules are tightly coupled and minimal changes are required to the interfaces between application tiers. The initial architectural review in this case could yield opportunities for shared code across all three tiers rather than result in separating the modules into distinct applications:

ASP to ASP.NET Migration

solutions for success

Hanu Software

Horizontal Migration
Horizontal migration refers to migration of an application module by module, completing the migration for all three tiers of one module before moving on to the next. As shown in the Figure given below. For example Horizontal migration would proceed through entire Recruitment Module first with all the three tiers (user interface, business components, and database) migrating together for that module. After the recruitment module is completely migrated the other two modules Leaves Management, and Salary Management will be migrated. A horizontal migration is most appropriate when application modules are loosely coupled and when interfacing between different application tiers is a tedious task. An architectural review all of the application's modules should be conducted before any module migration begins. This review should uncover opportunities for creating reusable code, and may lead to separating the modules into independent applications.

The vertical migration is most appropriate when the application's modules are tightly coupled and minimal changes are required to the interfaces between application tiers. The initial architectural review in this case could yield opportunities for shared code across all three tiers rather than result in separating the modules into distinct applications:

ASP to ASP.NET Migration

solutions for success

Hanu Software

Migration Life Cycle


We believe that no tool available till date is capable of providing a smooth and complte migration process. The tools can be used for basic migration but advanced migration requirements of the code can only be fulfilled using manual intervention in code. Though Hanu Software uses 'ASP to ASP.NET' migration tool for basic migration of code from ASP to ASP.NET but actual migration is done by our core development team. At Hanu Software, we follow a complete life cycle of ASP to ASP.NET migration to provide best migration results to our customers. The complete migration lifecycle at Hanu Software consists of four main stages.

Analysis: At this stage, we analyze the existing code, and create a migration strategy. We
consider the scope of migration, the processes required for migration such as code modification and testing plans. At this stage we also identify the .NET specific functionality that can be added to the application or can be replaced with ASP.NET functionality.

Conversion: At this stage, we perform the actual code conversion. We start developing and

modifying modules for migration. At this stage we perform unit testing and peer reviews for the converted code.

Re-factoring - At this stage, we perform code optimization and design improvement. This stage

can actually enables you to get long terms gains from the migration and can be helpful in drastically improving the performance of the application.

Testing: At this stage we conduct functional and non-functional testing for the modules that
have been successfully migrated. The complete life cycle of the migration process ensures a smooth migration of your system from ASP to ASP.NET

ASP to ASP.NET Migration

solutions for success

Hanu Software

Our Achievements: A Brief Case Study


Among all the migrations that we have done till date, we want to share case study with all our readers. We have recently migrated 2,00,000 lines of code successfully to .NET in the less than a month for one of our esteemed customers. We took long-term strategic approach and devised the strategy for meeting the business objectives of our client. The migration process included quick migration to .NET, .NET re-architecture, parallel run of the ASP and ASP.NET product using same database server, and the inclusion of Web services oriented architecture in the long run for the product. During the migration effort, a major architectural improvement was accomplished by removing all the SQL queries in the code and creating approx. 400 stored procedures for .NET version to speed up the performance and make the business layer more secure. While developers were writing the code, QA Lead prepared the System Test Cases by studying the features of the ASP based system. The System Test Cases were used to verify that all the features have been migrated properly. After 'Code Complete', the QA group started the System Testing using the system test cases. Any defects found during the System Testing got reported to the development team. After the QA verification, system was delivered to the Customer. During the 'Acceptance Testing' of the migrated version, only six bugs were found which were quickly fixed by the offshore team with a turnaround time of less than 24 hours. Product Enhancements After the successful completion of the migration work, HSS team took the complete ownership of .NET based code and carried out the following product enhancements to keep the product up-to-date with competition.

ASP to ASP.NET Migration

solutions for success

Hanu Software

Acknowledgments
The following Hanu Software Employees contributed to the development of this white paper

Manoj Srivastava-Practice Manager, having a tenacious IT experience, helps clients to


develop business application to leverage .NET platform renowned Indian College.

Amit Kataria- Consultant,Focuses on .NET development projects,Management Scholar from

For more information about Hanu Software Solutions Technology migration services, call our US Sales Information Center at (732) 668-3691 or email asingh@hanusoftware.com. In India, call the Hanu Software Solutions offshore delivery center at (732) 823-4153 or email msrivastava@hanusoftware.com. To access information using the World Wide Web, go to: http://www.hanusoftware.com/

ASP to ASP.NET Migration

You might also like