| Migrating and Converting ASP.NET Web Sites |
| Benefits of migrating your application, including greater separation of code from markup, reserved application folders, and flexible deployment options. The benefits of migrating are related to the new features in ASP.NET 2.0, including the new Web page code-behind model, Web application folder structure, and page compilation model. The Contents in this section provide guidance to use the new features of ASP.NET 2.0 in your ASP.NET 1.x application and more. |
|
| Please fill up the form below and we will submit a proposal for your project. Alternatively, you can send
email to contact@optionm.net with the project
requirements. |
|
|
|
|
|
 |
| Migration Overview |
|
|
| There are several options for using applications built in previous versions of ASP.NET with ASP.NET version 2.0: |
|
| You can migrate your existing ASP.NET application to ASP.NET 2.0. |
| You can run your existing ASP.NET application in the .NET Framework version 2.0 without migrating. |
| You can continue to run your existing ASP.NET application side-by-side with ASP.NET 2.0 applications. |
|
|
| The topics in this section provide information on migrating ASP.NET version 1.x applications to ASP.NET version 2.0. Included is information on how to enable forms authentication across ASP.NET versions, how to migrate Web pages that use the CodeBehind attribute of the @ Page directive to pages that use the CodeFile attribute and partial classes, and how to run an ASP.NET 1.x application in the .NET Framework version 2.0. |
|
 |
Migrating |
|
|
| Migrating from a previous version of ASP.NET to ASP.NET 2.0 means making the necessary changes so that your Web application compiles in the .NET Framework version 2.0. Before migrating a Web application, you should understand the new features of ASP.NET 2.0. The most important aspects to consider involve the changes in the page code-behind model, the Web application folder structure, and the page compilation model. |
|
| The new page code-behind model is based on partial classes and allows greater separation of markup and code. The use of partial classes removes the need for control declarations and event wire-up code in your code-behind files. |
|
| The new Web application structure in ASP.NET 2.0 uses reserved folders to contain specific content and help you organize your application more efficiently. Reserved folders do not serve Web requests for content, but can be accessed from application code. |
|
| By default, ASP.NET 2.0 automatically compiles application code and dependent resources when a request is made to a resource on your Web site. For example, changes to an existing Web page or dependent resources in ASP.NET 2.0 can simply be saved and the page requested again for the page and its resources to be recompiled. This applies to resources like code files in the App_Code folder, resource files in the App_GlobalResources and App_LocalResources folders, and themes in the App_Themes folder |
|
| If you plan on migrating many pages, it is recommended you use Visual Web Developer 2005, Visual Web Developer 2005 Express Edition, Visual Studio 2005, or Visual Studio 2005 Team System, each of which has a migration wizard that automates many of the tasks involved in migration. The wizard makes the necessary changes to your Web pages to make them compatible with ASP.NET 2.0. |
|
| If you are migrating from ASP to ASP.NET 2.0, there are more changes to consider, as ASP.NET 2.0 has been enhanced significantly over ASP. It is recommended you convert directly to ASP.NET 2.0 rather than converting ASP pages to a previous version of ASP.NET and then to ASP.NET 2.0. |
|
 |
Running ASP.NET v1.x Applications on the .NET Framework 2.0 |
|
|
| Web applications created in previous versions of ASP.NET are able to run in the .NET Framework 2.0 without recompiling. The .NET Framework 2.0 provides a high degree of backward compatibility with ASP.NET 1.x applications. You will be able to use ASP.NET 2.0 features in your application's pages as long as your application uses the .NET Framework 2.0. |
|
| By default, when the .NET Framework 2.0 is installed on a computer where a runtime is already installed, ASP.NET applications mapped to a previous version of the .NET Framework are not updated to use the newer version. To configure an existing ASP.NET 1.x application to use the .NET Framework 2.0, |
|
 |
Side-By-Side Execution |
|
|
| ASP.NET 1.x applications and ASP.NET 2.0 applications can run side-by-side on a Web server running Microsoft Internet Information Services (IIS). An existing Web application can be configured to run on a specified version of ASP.NET by using the Microsoft Management Console (MMC) Snap-In for ASP.NET. In side-by-side execution, you will not be able to use any features of ASP.NET 2.0 in an application running in the .NET Framework 1.x. |
|
|
|
| Click here to submit your project requirements to Option Matrix, India. |
| Back to top |
 |
| Migrating ASP.NET 1.x to ASP.NET 2.0 |
|
|
| Many of the programming concepts used in earlier versions of ASP.NET remain the same in ASP.NET version 2.0, so developing applications in ASP.NET 2.0 will be familiar for users of ASP.NET 1.x. ASP.NET 2.0 will run on the same operating systems and hardware that you use to run your ASP.NET 1.x applications, including Microsoft Windows 2000 and Microsoft Internet Information Services (IIS) 5.0, Microsoft Windows XP and IIS 5.1, and Microsoft Windows Server 2003 and IIS 6.0. |
|
| If you have an existing Web application that you have decided to migrate to ASP.NET, you should review the new features of ASP.NET 2.0 before migrating. The most important changes involve the page code-behind model, the Web application folder structure, and the page compilation model. |
|
| Before migrating you should ensure that your ASP.NET 1.x application can be compiled and run on the .NET Framework version it was developed on. Additionally, before starting migration, ensure that the Microsoft .NET Framework version 2.0 is installed and working. |
|
| This topic covers general considerations that should be taken into account before migrating. The following sections are discussed in this topic: |
|
 |
Benefits to Migrating |
|
|
| There are many benefits to migrating your Web application to ASP.NET 2.0, including improved markup and code separation, reserved application folders, and automatic code compilation. |
|
| The new code-behind model based on partial classes allows greater separation of markup and code, and removes the need for control declarations and event wire-up code in your code-behind files. In the ASP.NET page compilation model, code-behind files are compiled at run time into multiple assemblies on first request to the corresponding .aspx files. |
|
| ASP.NET now uses an improved Web application structure based on reserved folders. These folders contain specific content to help you organize your application more efficiently. Some reserved folders, such as App_Data, do not serve their content in response to Web requests but can be accessed from application code. |
|
| The ASP.NET 2.0 compiler automatically compiles application code and dependent resources when a request is made to a resource on your Web site. For example, changes to an existing Web page or dependent resources in ASP.NET 2.0 can simply be saved and the page requested again for the page and its resources to be recompiled. This applies to resources like code files in the App_Code folder, resource files in the App_GlobalResources and App_LocalResources folders, and themes in the App_Themes folder. |
|
| If you are migrating a large application, it is recommended you use Visual Web Developer 2005, Visual Web Developer 2005 Express Edition, Visual Studio 2005, or Visual Studio 2005 Team System, each of which has a migration wizard that automates many of the tasks involved in a typical migration. The wizard makes the necessary changes to convert ASP.NET 1.x Web applications to ASP.NET 2.0. |
|
| It is not necessary to migrate Web applications because ASP.NET 2.0 provides a high degree of backward compatibility with earlier versions. If you do not migrate, you can still use many of the features of ASP.NET 2.0 in your Web application, as long as your application uses the .NET Framework 2.0. |
|
 |
Page Models |
|
|
| The ASP.NET code-behind Web page model enables you to store the markup of a Web page in one file - the .aspx file - and the programming code in another file - the code-behind file. The code-behind model for ASP.NET 2.0 is different than earlier versions in that it uses a new language feature known as partial classes. The new code-behind model in ASP.NET 2.0 allows even greater separation of markup and code than earlier versions of ASP.NET. |
|
| Web pages that use the old code-behind model based on the CodeBehind attribute of the @ Page directive will continue to work in ASP.NET 2.0. However, it is recommended that you migrate these pages to the new code-behind model using the CodeFile attribute of the @ Page directive and a partial class definition in the code-behind file to take advantage of improved markup and code separation as well as automatic page compilation. Web pages that use the old code-behind model must be manually compiled. |
|
| ASP.NET version 1.1 also supports a variant of the code-behind model in which the CodeBehind attribute of the @ Page directive was replaced with the Src attribute. A Web page using the Src attribute will continue to work in ASP.NET 2.0 and does not require modification to run. |
|
| As an alternative to the code-behind model, the single-file page model places the page's markup and programming code in the same physical .aspx file. Single-file pages from earlier versions of ASP.NET will continue to work in ASP.NET 2.0 and do not require modification to run. |
|
 |
Sharing Data Across ASP.NET Versions |
|
|
| You can choose to migrate some parts of your Web site to ASP.NET 2.0 while leaving others unmodified. If your Web site is divided into independent Web applications working together to provide your Web site functionality, you might decide to migrate some applications and not others. In this scenario, you will not be able to share application state between migrated applications and non-migrated applications. Session state will likewise not be shared across applications unless you provide a custom session state solution that can be accessed from both ASP.NET 1.x and ASP.NET 2.0 pages. |
|
 |
Forms Authentication Across ASP.NET Versions |
|
|
| Forms authentication provides you with a way to authenticate users using your own code and then maintain an authentication token in a cookie or in the page URL. ASP.NET forms authentication can be made to work across applications running different ASP.NET versions so that authentication tickets issued by one version can be consumed by the other. |
|
| Configuring authentication to work across ASP.NET versions is similar to the process of configuring authentication across a network of Web servers (a Web farm). In both cases, you explicitly set the validationKey and decryptionKey attributes of the machineKey element for the applications sharing authentication tickets with the same key. To support authentication across ASP.NET versions, you must make the additional configuration change of setting the decryption attribute of the machineKey element to 3DES in your ASP.NET 2.0 application's Web.config file. The default encryption for ASP.NET 2.0 is AES, whereas earlier versions of ASP.NET use 3DES. |
|
 |
Name Conflicts |
|
|
| Before migrating, it is recommended that you scan your Web application and look for names that conflict with feature classes and namespaces in the .NET Framework 2.0. Conflicts might occur when common names such as cache, membership, profile, and role are used in your Web application but are already in use in the .NET Framework. To avoid a naming conflict, locate references in your code to any names in question and use a fully qualified reference. |
|
| ASP.NET 2.0 uses a different Web site layout than earlier versions. To make it easier to work with Web applications, ASP.NET reserves certain folder and file names that you can use for specific types of content. Content in reserved folders is not served to Web requests made to it; this can lead to issues in your existing application. Therefore, before migrating individual application files it is recommended you change the names of any of your application folders or files that conflict with ASP.NET 2.0 reserved folder and file names. |
|
 |
Markup Compliance |
|
|
| By default, all markup that is produced by ASP.NET and the Web server controls included with ASP.NET now conforms to the XHTML 1.0 Transitional standard. This can lead to unintended HTML rendering issues after migration. To help in migration of a Web application, you can set the mode attribute of the xhtmlConformance element to Legacy in your Web.config file. This should be a temporary step in the migration process. In the long term, it is recommended you run your application with the mode attribute of the xhtmlConformance element set to Transitional. Additionally, it is recommended that you add the DOCTYPE element to your migrated pages. |
|
 |
HttpOnly and Cross-Site Scripting |
|
|
| The HttpOnly property of the HttpCookie class is new in the .NET Framework 2.0. Setting this property to true can help mitigate cross-site scripting threats. The HttpOnly property is set to true automatically for forms authentication cookies and session ID cookies so that these cookies are not available to client-side scripting. If a migrated Web page throws a NullReferenceException exception, it might indicate that the session from the client was lost because the HttpOnly property was set to true. If this is the case, you can use one of the following resolutions: |
|
| Set the HttpOnly property of each cookie to false in the EndRequest event handler of the HttpApplication class in the Global.asax file. |
| Write a custom module that copies the cookie into another cookie, and clears the HttpOnly property so it can be manipulated by client script. |
| Write a custom session ID manager that does not set the HttpOnly property to true. |
|
|
|
|
| Click here to submit your project requirements to Option Matrix, India. |
| Back to top |
 |
| Migrating ASP Pages to ASP.NET |
|
|
| ASP.NET offers significant improvements over ASP in the areas of performance, state management, scalability, configuration, deployment, security, output cache control, Web farm support, and XML Web service infrastructure. |
|
| If you have ASP development skills, the new ASP.NET programming model will seem very familiar to you. However, the ASP object model has undergone significant changes to make it more structured and object-oriented, so most existing ASP pages will have to be modified to some extent in order to run under ASP.NET. Major changes to Visual Basic as well mean that existing ASP pages written with Visual Basic Scripting Edition typically will not port directly to ASP.NET. In most cases, though, the necessary changes will involve only a few lines of code. |
|
| Most developers will probably choose to rewrite existing ASP applications to gain the performance, readability, and maintainability improvements of the new development environment. But because a Web application can contain both ASP and ASP.NET pages, the conversion does not necessarily have to be carried out on all pieces of the entire Web application at once. |
|
| ASP and ASP.NET can run side by side on an Internet Information Services (IIS) Web server without interference. Only files with an .aspx file name extension are processed by ASP.NET; files with an .asp file name extension will continue to be processed by the existing ASP engine. You should be aware, however, that session state and application state are not shared between ASP and ASP.NET pages. |
|
|
|
| Click here to submit your project requirements to Option Matrix, India. |
| Back to top |
 |
| Web Solution and Project File Conversion |
|
|
| Visual Studio 2005 changes the Web project model in many ways. For example, a project file is no longer needed because all files in the Web application folder are considered part of the Web project. |
|
| The new Web project model affects the conversion of files such as ASP.NET Web Forms pages (.aspx files), ASP.NET user controls (.asxc files), the Global.asax file, and the Web.config file. The exact changes made in these files depend on the programming language of the project that is being converted. |
|
| Visual Studio 2005 changes the code-behind model to use partial classes, which allow a class to span multiple files. In the previous code-behind model, the .aspx file inherits from a compiled class file created from the corresponding code-behind file (.aspx.vb or .aspx.cs). In the new code-behind model, the .aspx file inherits from a compiled class consisting of its corresponding .aspx.vb or .aspx.cs file, as well as a stub file that is generated from the .aspx file and that defines the field declarations for the controls that are used in the .aspx file. This change allows the auto-generated code to be separated from the user's code. User controls (.ascx) and the code-behind files for user controls are treated similarly. |
|
| Visual Studio 2005 changes the compilation model from producing one assembly to producing many assemblies. Each ASP.NET Web page and user control can be compiled into its own assembly. This change allows more deployment scenarios, such as publishing your source code to the server and letting it dynamically compile parts of your Web application, as needed. |
|
 |
Code-Behind Files |
|
|
| The following changes are made to ASP.NET Web pages and user controls during the conversion to the new ASP.NET version 2.0 code-behind model: |
|
| The CodeBehind attribute in the @ Page directive is changed to a CodeFile attribute. |
| An Inherits attribute is added to the @ Page directive pointing to the associated compile-with class file. |
| All code-behind class definitions are changed to implement the Partial keyword. |
| Member declarations for user controls are removed from the code-behind page. In the compile-with model, instances of the user controls are created automatically from the declarative code. |
| Events are bound to controls using declarative syntax. For example, the Click event for a Button control is bound to the control by adding an OnClick attribute to the asp:button element in the declarative code. Delegates and the Visual Basic Handles keyword in methods are removed. Delegates are not removed for members that are not represented in the declarative code, such as delegates for dynamically created controls. |
| Member declarations in class files (but not in page classes) that are marked as Friend or Internal are changed to Public. |
| Debugger breakpoints are not converted, and they will not appear in the converted files. |
 |
Note: |
| If a Web page or user control does not have a CodeBehind attribute in the @ Page directive, it is not converted. Similarly, Web pages or controls that contain a Src attribute are left intact. |
|
|
|
 |
Stand-Alone Code Files |
|
|
| The following changes are made to stand-alone code files: |
|
| The stand-alone code files are moved to the App_Code directory. |
| Member declarations that are marked as Friend or Internal are changed to Public. This change is required because with multiple assemblies the access level must be such that the members are visible from assemblies other than the assembly containing the compiled stand-alone code file. |
| Calls to the Type..::.GetType method are changed to use the BuildManager..::.GetType method. The BuildManager..::.GetType method finds types within top-level assemblies. |
| Debugger breakpoints are not converted, and they will not appear in the converted files. |
|
|
 |
Designer Settings |
|
|
| Settings in a page that pertain to the designer are handled in different ways during conversion: |
|
| The MS_POSITIONING attribute (flow layout or grid layout) is left in place, and Visual Studio retains this setting along with the absolute positioning attributes of individual controls. However, by default, new pages in Visual Studio use flow layout and do not include the MS_POSITIONING attribute. |
| The <meta> tag for the default client script language is left intact. |
|
|
 |
Global.asax File |
|
|
| When the Global.asax file is converted, its code-behind file is moved to the App_Code directory. The conversion process makes the following changes: |
|
| The CodeBehind and Inherits attributes are removed from the @ Application - Global.asax directive. |
| A Language attribute is added to the @ Page directive, if one is not already specified. |
| For Visual Basic, a Namespace statement is added to the class file. The namespace is defined by the root namespace in the Web project. |
|
|
 |
Web.config File |
|
|
| In Visual Studio 2005, the Web.config file supports a wider variety of elements than it does in Visual Studio .NET. For example, project settings that still apply to Visual Studio are often converted to the Web.config file. |
|
|
|
| Click here to submit your project requirements to Option Matrix, India. |
| Back to top |
 |
| Convert a VS.NET Project to VS 2005 |
|
|
| This topic describes how to convert a Microsoft Visual Studio .NET 2002 or 2003 project to Microsoft Visual Studio 2005 using the Visual Studio Conversion Wizard. The wizard makes many of the changes to your Web site so that it can be compiled as an ASP.NET version 2.0 Web site. The wizard is included in Visual Web Developer 2005, Visual Web Developer 2005 Express Edition, Visual Studio 2005, and Visual Studio 2005 Team System. |
|
 |
Running the Conversion Wizard |
|
|
| Opening a project created in a previous version of Visual Studio .NET will automatically invoke the conversion wizard. After the conversion process is completed, the changes made cannot be reversed. The wizard will prompt you to save a backup copy of your project before conversion begins. It is also a good practice to make a backup copy of the original project before starting the conversion wizard. |
|
| The .NET Framework allows you to install multiple versions of the common language runtime on the same computer. Installing the .NET Framework version 2.0 will not disrupt any existing applications that are running on previous versions of the .NET Framework. Similarly, Visual Studio 2005 can run side-by-side with previous versions. This means that you can convert applications as needed. This also works for solutions that are composed of several applications. In this scenario, each application can be converted independently. |
|
| The following procedure is for Visual Web Developer 2005. The steps for opening Visual Studio .NET projects in other Microsoft Visual Studio 2005 products might vary. |
|
| To convert a Visual Studio .NET Project |
| 1. Open Visual Web Developer 2005. |
|
| 2. On the File menu, click Open Web Site. |
|
| This dialog box allows you to open an existing Web site on the local computer, whether Microsoft Internet Information Services (IIS) is installed or not. Select the appropriate tab for your situation. The choices are File System, Local IIS, FTP Site, and Remote Site. |
|
 |
Note: |
| If a Web page or user control does not have a CodeBehind attribute in the @ Page directive, it is not converted. Similarly, Web pages or controls that contain a Src attribute are left intact. |
|
|
| 3. Navigate to the folder or virtual directory of the Visual Studio .NET project to be converted. |
|
4. Click Open.
The Visual Studio Conversion Wizard starts. The starting page of the wizard provides information that you should read before continuing. |
|
5. Click Next.
The second page of the wizard appears. On this page, you can choose whether to create a backup copy of your solution or project. If you have not already created a backup of your project or solution before starting the conversion, it is recommended you do so at this point. |
|
6. Click Next.
The third page of the wizard appears. This page provides a summary of what the wizard will do. At this point you can still click Cancel to stop the conversion. |
|
7. Click Finish to start the conversion process.
The conversion process begins. If the wizard encounters a project that contains a custom configuration, you will be prompted to select a configuration to convert. If the Select a Configuration to Upgrade dialog box appears, select a configuration and click OK to continue.
After the conversion process is complete, the fourth page of the wizard appears with a summary of the conversion process. |
|
8. Make sure the Show the conversion log when the wizard is closed check box is selected.
This will open the conversion log as an active document in Visual Studio when the conversion process is completed. |
|
9. Click Close to exit the Visual Studio Conversion Wizard.
The wizard closes and the Conversion Report opens. |
|
| 10. Verify the status of the conversion process by reviewing the Conversion Report. |
|
|
|
|
|
| Click here to submit your project requirements to Option Matrix, India. |
| Back to top |
|
| Option Matrix Featured Case Studies |
|
| Option Matrix Whitepapers |
|
|
|
|
| Portal for Multi-location Hospital |
| The client was a healthcare provider (multi-location hospital) for the local resident patients having sleeping disorders. Option Matrix's scope of consulting was for their Seattle, |
|
|
|
| Health Fitness Portal |
| Client was establishing a Health Fitness Center at California established in June 2006 by a team of local Antelope Valley residents. It was offered full complement of new and innovative |
|
|
|
| Sleep Disorders Hospital Application |
| This project was the company service portal of "Client" for patients suffering from sleep disorders. It was information about the company, key personnel, HIPPA privacy, education resources, |
|
|
|
| Batteries Ecommerce Portal |
| The objective was to design an e-commerce website for Client to display their catalog of batteries online and collect orders which was forwarded by e-mail to be serviced by a third |
|
|
|
| Spices & Herbs Ecommerce Website |
| The overall purpose of this project was to develop an intuitive and professional spice and herbal ecommerce web site. This web site was accessed by site visitors, members (retail consumers), |
|
|
|
| Portal for Web Design Firm |
| The client, a web design firm located in USA. It positions itself as an idea company and offers services such as website design / development coupled with creative marketing, Internet |
|
|
|
| Dynamic Content Portal |
| The overall purpose of the project was to redesign a database driven dynamic version of the existing site including migration of existing content on the site to the new site design and |
|
|
|
| Networking Systems Ecommerce |
| The USA Based client was one of the leading provider of used and Refurbished Cisco Systems, Extreme Networks, Juniper and Foundry equipment. The client has the experience |
|
|
|
| 3rd Party Order Fulfillment |
| This project envisages provision of e-commerce for people in continent B countries who cannot do such transactions in normal course with US based online retailers as shipments |
|
|
|
| Multi-lingual Recruiting Portal |
| This project was for building a specialized job portal for Tourism Schools in Austria. This institutions offer training that enables college students or graduates to get trained for jobs in hotels, |
|
|
|
| Corporate Web Portal |
| The client was focused on providing process control solutions to the manufacturing and related industries. Established in 1989, this Client was a BSI-certified ISO 9001:2000 |
|
|
|
| Business Community Portal |
| The overall purpose of this project was to extend the features of existing business community web application meant for New Platform of projects for Team Formation and Expertise Management |
|
|
|
| Online Generic Store Portal |
| This project was intended to be a generic store front that was customized for several clients in the future. The intended objective was to build once and deploy for several clients with easy customization. |
|
|
|
| CMS Portal |
| The overall purpose of the project was to redesign a database driven dynamic version of the existing site including migration of existing content on the site to the new site design |
|
|
|
| HR Marketplace |
| This project has focused on development for Human Resources professionals who was seeking quality, unbiased information necessary to make educated buying decisions while keeping |
|
|
|
| Portal for IT Infrastructure Provider |
| An existing company of the client was looking for development of this project with redevelop the company profile and informational website and requires a graphic redesign along |
|
|
|
| Portal for Online Cosmetics Store |
| This project Development was focused on a pre-launch splash page that would capture email addresses to be used to communicate with consumer & Send confirmation email |
|
|
|
| Online Shipment Tracking |
| Development of this application was taken up to enable the customers to track the status of their shipments for a third party logistics provider and analyze all the information. |
|
|
|
| Online Survey Measurement Portal |
| Client had required a web application for a charitable association which provides funds to a set up 200 or more schools. Client administers survey to monitor the correct usage of funds |
|
|
|
| Performance Measurement Portal |
| The overall purpose of this system was to enable a company's document & its business strategy along with critical success factors and define an information bank with key |
|
|
|
| Case Studies A - Z Index |
| We have Provided a full history of our project Case Studies across all Technologies, Services and Industries. |
|
|
| | | | | | | | |