In this topic
- About migrating the Web ADF to 10
- Migrating Web mapping applications
- Migrating custom Web ADF applications
About migrating the Web ADF to 10
The ArcGIS 10 Web ADF is built on the same basic framework provided in ArcGIS 9.3. Various technology and performance enhancements are incorporated in ArcGIS 10 to provide a more comprehensive platform on which to build Web ADF applications. As a result, some modifications to existing ArcGIS 9.3 Web ADF applications are required.
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. See the following table that shows the supported migration options:
9.2 or 9.3 Web ADF application type
|
Automated migration
|
Automated upgrade
|
Manual migration
|
Web mapping application created, customized, and managed in Manager only | Yes, using Manager | Yes, using Manager | Possible, but not recommended |
Web mapping application created and managed in Manager, and customized outside of Manager | Yes, using Manager | No, customizations can be overwritten without backup | Might be necessary after automated migration |
Web mapping application created outside of Manager (for example, in Visual Studio) | Yes, using the migration utility | No | Might be necessary after automated migration |
Custom Web ADF application not based on the Web Mapping Application template |
|
No | Yes |
Migrating Web mapping applications
To migrate applications based on ArcGIS 9.2 or ArcGIS 9.3 Web Mapping Application templates, the following automated options are provided:
Manager Web application
Web mapping application Web sites managed by ArcGIS 9.2 and ArcGIS 9.3 Manager are stored in the Sites.xml file within the Manager Web application. After installing ArcGIS 9.3 Manager and logging in, you can choose to view current managed Web applications by clicking the Applications tab in the console panel on the left side of the page.
- If the Sites.xml file references at least one 9.2 application, Manager shows the following dialog box indicating that you need to migrate all applications:
When the migration finishes, a migration report and status is provided for all Web sites. At this point, all Web applications use ArcGIS 10 Web ADF components. There are some subtle differences in the user interface (UI) of the Web application including the following:
- The application upgrades the Identify tool to use the ArcGIS 10 Identify control.
- The following new controls are added:
- ZoomToScale—Provides a drop-down list of scales or a text box to add a map scale.
- GoToLocation—Provides a dialog box to add a coordinate to zoom to.
Once migrated, your Web application runs using the ArcGIS 10 Web ADF libraries, but retains the UI of the pre-ArcGIS 10 Web Mapping Application template.
- To edit a Web application in Manager, upgrade it to the ArcGIS 10 Web Mapping Application template. Manager shows the following Upgrade Web Application dialog box indicating that an upgrade is needed when you try to edit the Web application:
Upgrading a Web mapping application changes the structure of the application to provide the new ArcGIS 10 Web mapping application UI.
Web Mapping Application Migration Utility
To migrate applications built with the ArcGIS 9.2 or 9.3 Web Mapping Application template outside of Manager, use the Web Mapping Application Migration Utility. The Web application will not upgrade to the ArcGIS 10 Web Mapping Application template, although it will contain enhancements packaged with the ArcGIS 10 Web ADF controls.
Do the following to use the utility:
- Click Start, All Programs, ArcGIS, ArcGIS Server for the Microsoft .NET Framework, then click Web Mapping Application Migration Utility. The ArcGIS Server Web Mapping Application Migration Utility dialog box appears.
- Select the check boxes next to the available Web applications on the current Web site that you want to migrate. You can also select a location on the file system in which to migrate Web applications. Only Web applications that contain 9.2 or 9.3 Web ADF content show in the list. See the following screen shot:
The migration utility does the following for applications based on the Web mapping application:
- Changes the version of all ArcObjects primary interop assemblies (PIAs) and Web ADF assemblies to reference 10.
- Adds reference to the following 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
- Replaces references to Converter methods in new libraries (added in the preceding item).
- Removes references to ArcWeb assemblies.
- Removes references to the FindPlace task in Web Mapping Application themes and markup.
- Replaces the following files in the JavaScript folder:
- display_measure.js
- MapIdentify.js
- WebMapApp.js
- Adds the following images to the Image folder:
- allbackActivityIndicator2.gif
- dismiss.png
- expand.gif
- collapse.gif
- dropdown-button.png
- crosshair.png
- dismiss_solid.png
- Replaces the following Measure tool user control files:
- Measure.ascx
- Measure.ascx.cs
- Creates a folder in the Web application root named "_93upgradebackup" and copies files updated or replaced in the migration process. These files include the following:
- web.config
- WebMapApp.js
- display_measure.js
- MapIdentify.cs
- Measure.ascx
- Measure.ascx.cs
For custom applications that contain Web ADF controls and components, the utility does the following:
- Changes the version of all ArcObjects PIAs and Web ADF assemblies to reference 10.
- Adds reference to new Web ADF assemblies, if referenced.
- Removes references to ArcWeb assemblies.
- Removes references to the FindPlace task in the markup.
The preceding modifications enable the Web application to function using ArcGIS 10 Web ADF components. The Web application retains the UI of the 9.2 or 9.3 Web Mapping Application template. For more information on updates and changes in the ArcGIS 10 Web ADF, see What's new in 10.
Migrating custom Web ADF applications
Migration of custom Web ADF applications from ArcGIS 9.3 to ArcGIS 10 requires some basic steps. The Web ADF is a complex product with numerous application programming interfaces (APIs) and capabilities. Depending on the complexity of your application, additional modifications might be required. At a minimum, to update your ArcGIS 9.3 Web ADF application to work with ArcGIS 10, do the following steps:
- To remove references to ArcWeb assemblies, in the web.config or component code, remove references to ESRI.ArcGIS.ADF.Web.DataSources.ArcWebService.dll and ESRI.ArcGIS.ADF.ArcWebService.dll.
- Remove references to the FindPlace task in the markup (*.aspx) or code-behind.
- Change the version of the Web ADF and ArcObjects assemblies to use ArcGIS 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 on the Add Reference dialog box in Visual Studio in the global assembly cache (GAC), or by right-clicking the assembly in Windows Explorer and selecting the Properties, then Version tab. The assemblies are installed in the <ArcGIS Install>\DotNet folder.
- To change references across multiple applications at the same time, use the Find and Replace dialog box in Visual Studio. To change reference versions for all files (namely, web.config, *.aspx, and *.csproj) in a directory, start Visual Studio. Click Edit, Find and Replace, then Replace in Files. Add the old 9.3 version to find, add the new 10 version to use during the replace operation, and select the folder in which the change should occur. To find all 9.3 versions, use regular expressions to locate the text to change. Select the Regular Expressions find option and add the value to find as, "9.3.[0-9].[0-9][0-9][0-9][0-9]."
- 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) has 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 need to add a reference to one or more new libraries packaged with the 10 Web ADF. The following are 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
- The ESRI.ArcGIS.Server.WebControls assembly has been removed at ArcGIS Server 10. Applications that depend on this assembly need to be updated to work with the latest technology. You might need to work with Web controls included in the latest ADF product, or restructure your application using remote ArcObjects.
In many cases you, 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.
You will also need to change namespaces associated with these libraries in your code. For example, in ArcGIS 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 ArcGIS 10, the 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.