How to migrate the Web ADF to 10


Summary This topic discusses migrating Web ADF applications from version 9.2 or 9.3 to 10.

The 10 Web ADF is built on the same basic framework provided in 9.3.  A number of technology and performance enhancements are incorporated in 10 to provide a more comprehensive platform on which to build Web ADF applications.  As a result, a few modifications to existing 9.3 Web ADF applications are required.  Your migration options depend on whether you built a Web ADF application using the Web Mapping Application template (includes applications generated by Manager) or you built a custom Web ADF application without the template.  The following matrix will guide you to the appropriate supported migration options available for you. 

9.2 or 9.3 Web ADF application type
Automated Migration
Automated Upgrade
Manual Migration
Web Mapping Application created, customized and managed within Manager only
Yes, Using Manager Yes, Using Manager Possible.  Not recommended.
Web Mapping Application created and managed in Manager, customized outside of Manager Yes, Using Manager No (customizations may be overwritten with no backup) May be necessary after automated migration
Web Mapping Application created outside of Manager (e.g. Visual Studio)
Yes, Using the migration utility No May be necessary after automated migration
Custom Web ADF application not based on the Web Mapping Application template
Yes, Using the migration utility   No Yes


Migrating Web Mapping Applications



To migrate applications based on the 9.2 or 9.3 Web Mapping Application template, two automated options are provided: 

  • Manager

    Web Mapping Application web sites managed by both 9.2 and 9.3 Manager are stored in the Sites.xml file within the Manager Web application.  After installing 9.3 Manager and logging in, you can choose to view the current managed Web applications by clicking on the Applications tab in the console panel along the left side of the page.  If the Sites.xml file references at least one 9.2 application, Manager will prompt you to migrate all applications using the following dialog:



    When finished, a migration report and status is provided for all Web sites.   At this point, all Web applications will use the 10 Web ADF components.  There are some subtle differences in the look and feel of the Web application including:
     
    • The application will upgrade the Identify tool to use the 10 Identify control
    • Two new controls have been added.  The ZoomToScale control provides a drop-down list of scales or a textbox to enter a map scale.  The GoToLocation control provides a dialog to enter a coordinate to zoom to. 

    Once migrated, your Web application will run using the 10 Web ADF libraries, but retain the look and feel of the pre-10 Web Mapping Application template.   To edit a Web application in Manager, you need to upgrade it to the 10 Web Mapping Application template.  You will be prompted with the following dialog by Manager to upgrade when you try to edit your Web application. 





    Upgrading a Web Mapping Application will change the structure of the application to provide the new 10 Web Mapping Application look and feel.
  • Web Mapping Application Migration Utility

    To migrate applications built with the 9.2 or 9.3 Web Mapping Application template outside of Manager, use the Web Application Migration Utility.  Note, the Web application will not be upgraded to the 10 Web Mapping Application template, although it will contain enhancements packaged with the 10 Web ADF controls themselves. 

    To use the utility navigate to the program menu shortcut: Start > All Programs > ArcGIS 10 > ArcGIS Server for the Microsoft .NET Framework > Web Mapping Application Migration Utility.  The dialog will prompt you to select (check) Web applications available on the current Web site you want to migrate.   You can also select a location on the file system to migration Web applications.   Only Web applications that contain 9.2 or 9.3 Web ADF content will be displayed in the list. 

       

    This utility will do the following for applications based on the Web Mapping Application:
    • Change version of all ArcObjects Primary Interop and Web ADF assemblies to reference 10.
    • Add reference to four new Web ADF assemblies:
      • ESRI.ArcGIS.ADF.Web.UI.WebControls.Layout.dll
      • ESRI.ArcGIS.ADF.Connection.Local.dll
      • ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local.dll
      • ESRI.ArcGIS.ADF.Local.dll
    • Replace references to Converter methods in new libraries (added in previous item). 
    • Remove references to ArcWeb assemblies
    • Remove references to the FindPlace task in Web Mapping Application themes and markup.
    • Replace the following files in the JavaScript folder:
      • display_measure.js
        MapIdentify.js
        WebMapApp.js
    • Add the following images to the Image folder:
      • allbackActivityIndicator2.gif
        dismiss.png
        expand.gif
        collapse.gif
        dropdown-button.png
        crosshair.png
        dismiss_solid.png
    • Replace the Measure tool user control files:
      • Measure.ascx
        Measure.ascx.cs
    • Create a folder in the Web application root named "_93upgradebackup" and copy files updated or replaced in the migration process.  These files include web.config,
      WebMapApp.js, display_measure.js, MapIdentify.cs, Measure.ascx, and Measure.ascx.cs. 
For custom applications that contain Web ADF controls and components, this utility will:
    • Change the version of all ArcObjects Primary Interop and Web ADF assemblies to reference 10.
    • Add reference to new Web ADF assemblies, if referenced.
    • Remove references to ArcWeb assemblies
    • Remove references to the FindPlace task in markup.

These modifications will enable the Web application to function using the 10 Web ADF components.  The Web application will retain the look and feel of the 9.2 or 9.3 Web Mapping Application template.   Refer to the What's new in 10 page for more information on updates and changed in the 10 Web ADF.
 
 

Migrating custom Web ADF applications


Migration of custom Web ADF applications from 9.3 to 10 requires a few basic steps.  Please note, the Web ADF is a complex product with numerous APIs and capabilities.  Depending on the complexity of your application, some additional modifications may be required.  At a minimum, to update your 9.3 Web ADF application to work with 10, do the following:
  1. Remove references to ArcWeb assemblies.

    In the web.config or component code remove references to the ESRI.ArcGIS.ADF.Web.DataSources.ArcWebService.dll and ESRI.ArcGIS.ADF.ArcWebService.dll.
  2. Remove references to the FindPlace task.

    Remove the FindPlace task in the markup (*.aspx) or code-behind.
  3. Change the version of the Web ADF and ArcObjects assemblies to use 10. 

    You can change the existing reference using Visual Studio.  For Web applications you can modify the web.config file directly.  The specific assembly version is available in the Add Reference dialog in Visual Studio, in the GAC, or right-clicking on the assembly in Windows Explorer and selecting the Properties>Version tab.  The assemblies are installed in the <ArcGIS Install>\DotNet folder.  

    One technique for changing references across multiple applications at the same time uses the Find and Replace dialog in Visual Studio.  To change reference versions for all files (namely web.config, *.aspx, and *.csproj) in a directory, open Visual Studio and from the menus select Edit > Find and Replace > Replace in Files.   Enter the old 9.3 version to find, enter the new 10 version to use during the replace operation, and select the folder in which the change should occur.   Note, to find all 9.3 versions, use regular expressions to locate the text to change.  Check the find option Regular Expressions and enter the value to find as "9.3.[0-9].[0-9][0-9][0-9][0-9]". 
  4. Add references to new ArcGIS Server Local libraries and change namespaces. 

    Web ADF components work with ArcGIS Server over a local connection (ArcGIS Server local data source) have been separated into distinct libraries.  If you reference a class or component in your application that uses ArcGIS Server over a local connection, be aware that you will need to add a reference to one or more new libraries packaged with the 10 Web ADF.  Here is a list of the new libraries:
    • ESRI.ArcGIS.ADF.Local
    • ESRI.ArcGIS.ADF.Connection.Local
    • ESRI.ArcGIS.ADF.ArcGISServer.Local
    • ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local
    • ESRI.ArcGIS.ADF.Web.UI.WebControls.Layout
You will also need to change namespaces associated with these libraries in your code. 

For example, in 9.3 you can use the ToIPoint method on the ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Converter class to convert a Web ADF point to an ArcObjects point.   In 10 to ToIPoint method resides on the ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local.Converter class, thus a reference to the ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.Local assembly must be added and the namespace in the source must be updated to accommodate this change. 
  1. The ESRI.ArcGIS.Server.WebControls assembly has been complete removed at the ArcGIS Server 10 release.  Applications that depend on this assembly will need to be updated to work with the latest technology.  You may need to work with Web controls included in the latest ADF product, or restructure you application using remote ArcObjects.  In many cases you will need to update your application to work with Web controls in the ESRI.ArcGIS.ADF.Web.UI.WebControls or ESRI.ArcGIS.ADF.Web.UI.WebControls.Layout assemblies.   For example, instead of using the ESRI.ArcGIS.Server.WebControls.WebPageLayout class, reference the ESRI.ArcGIS.ADF.Web.UI.WebControls.WebPageLayout in the ESRI.ArcGIS.ADF.Web.UI.WebControls.Layout assembly.