In this topic
- About migrating the Web ADF
- Migrating single-source versions
- Migrating multi-source versions
- Comparing the architecture between versions
About migrating the Web ADF
The ArcGIS Server 9.0 to 9.1 Web Application Developer Framework (ADF) included a set of controls and convenience classes to work with a single source ArcGIS Server via Component Object Model (COM) proxies to ArcObjects on the server. The ArcGIS Server 9.3 Web ADF includes a set of controls and a common application programming interface (API) to work with multiple data sources generically. One of the supported data sources is ArcGIS Server Local, the same type supported by 9.0 and 9.1. The ArcGIS Server Local data source uses Value objects and COM proxies to work with ArcObjects.
The following discusses the options for migrating applications from 9.0 and 9.1 to 9.3.
Migrating single-source versions
Single-source components included with 9.3 have the same functionality as the 9.0 and 9.1 Web ADF. To migrate a 9.0 or 9.1 application to use the 9.3 single-source controls, do the following steps:
- Open the Visual Studio 2003 project in Visual Studio 2005.
- Step through the project conversion wizard.
- Rebuild, then run the project.
If converting a project file, a file system Web site is created. Do the following to convert this Web site to an Internet Information Services (IIS) Web site:
- Copy the folder of the converted project to a location the IIS server can access.
- Click Start, Control Panel, Administrative Tools, Internet Information Services Manager (or Internet Information Services) to open the IIS Manager.
- On the Internet Information Services window, click to expand the local computer, Web Sites, and Default Web Site nodes. If the converted project is available under the IIS root folder (for example, c:\inetpub\wwwroot), navigate to the folder. If it is not available, create a virtual directory that points to the physical location of the converted project folder.
- Right-click the virtual directory and select Properties.
- On the Directory tab, click the Create button in the Application Settings section.
- Click OK.
- In Visual Studio 2005, click File, Open, and Web Site to open the Web application.
- On the Open Web Site dialog box, click Local IIS, then navigate to the virtual directory associated with the converted project.
If converting a solution, an IIS Web site is created but not completely enabled; therefore, do Steps 2–8.
Single-source Web ADF controls do not support absolute positioning at design-time and display in Visual Studio 2005 in flow layout. At runtime, they adhere to the absolution positioning properties. Single-source Web ADF controls are not integrated into the Visual Studio 2005 toolbox. Manually add the controls by right-clicking the toolbox, selecting Choose Items, the 9.3 version of the ESRI.ArcGIS.Server.WebControls.dll, then the applicable items on the Choose Toolbox Items dialog box.
Migrating multi-source versions
There are advantages with the new functionality and enhancements included with the 9.3 Web ADF; however, there is no direct migration path. Usually, you will need to rebuild and rewrite the user interface (UI), and basic framework of the Web ADF application.
Some of the business logic that utilizes ArcObjects on the geographic information system (GIS) Server might be retained. The ArcGIS Server ArcObjects library and API is still available. Server context can be acquired via an ArcGIS Server Local data source. As a result, ArcObjects can be explicitly created on the GIS Server and referenced in the client using the same techniques available in 9.0 and 9.1.
The following discusses important changes in the multi-source Web ADF:
- Visual Studio Web application templates included with 9.0 and 9.1 have been removed. Instead, a single Web Mapping Application template has been provided to illustrate the enhanced map display and interactive capabilities in the 9.3 Web ADF. The following are the replacement applications and topics for the 9.0 and 9.1 Web application templates:
- Map viewer—Uses the Web mapping application.
- Page layout template—Uses the PageLayout control in a custom application.
- Search—Uses the FindTask control included with the Web mapping application or as part of a custom application.
- Thematic map—No application, sample, or topic provided.
- Geocoding—Uses the GeocodeResourceManager control. Various geocode samples are provided.
- Buffer selection—Two samples showing the use of the Web ADF common API and ArcGIS Server APIs to select and buffer features are provided.
- The Visual Studio Web Service Catalog template, used to expose server objects as Web services, has been removed. Instead, exposing and managing server objects as Web services is supported out-of-the-box in the ArcCatalog Desktop application and the ArcGIS Manager Web application.
- A new connection library, ESRI.ArcGIS.ADF.Connection, is provided and can be used to create a connection to an ArcGIS Server server object. Authentication credentials can also be defined for the connection.
- The Impersonation control is not required. Impersonation is now defined in the web.config file using the identity tag. In Visual Studio 2005, the context menu on the Web project in the Solution Explorer provides a menu option, Add ArcGIS Identity, that shows a dialog box to define and encrypt identity credentials in web.config.
- Single-source client resources (for example, scripts, images, and style sheets) are located in <IIS Root>\aspnet_client\esri_arcgis_server_webcontrols. All Web applications on an IIS server that use the single-source Web ADF use the same set of resources. Multi-source resources are located in <IIS Root>\ESRI. Web applications that use the multi-source Web ADF can define a location on disk to access resources or by default, utilize resources embedded in the Web controls. As a result, you can choose to customize and share resources on disk for some Web applications while using the default resources for others on the same Web server.
- The Web ADF controls and common API use Value objects and proxies to work with ArcGIS Server Local data sources instead of ArcObjects COM proxies. Value objects and proxies are defined by the ArcGIS Server Simple Object Access Protocol (SOAP) API because they are used to construct stateless SOAP requests processed by a server object. A Web ADF application can access a server object via the ArcGIS Server server object manager (SOM) or indirectly via a Web service endpoint. In both cases, the server object is processing a SOAP request and generating a SOAP response.
For more information on ArcGIS Server implementation in the 9.3 multi-source Web ADF, see ArcGIS Server Implementation in the Web ADF.
Comparing the architecture between versions
The single-source Web ADF supports a single data source, ArcGIS Server Local, and includes convenience classes to manage interaction with server context and ArcObjects on the server.
The multi-source Web ADF has added a generic layer between the Web controls and data source specific APIs to accommodate multiple sources of data. To support a data source, the interfaces and classes in the generic layer must be implemented to define how to leverage the Web ADF usage of what the data source provides. Additionally, the ArcGIS Server Local data source is designed to work primarily with a set of Value objects that emulate some ArcObjects functionality. The Value objects are used by a proxy to work with a server object.
The WebMap convenience class in the single-source Web ADF is not available in the multi-source version. Instead, a set of implementation classes for ArcGIS Server Local data sources are provided.
The following illustration shows comparable structures in the single-source versus the multi-source versions of the Web ADF.
In the multi-source Web ADF, each Map control creates a MapFunctionality to work with a Value object MapDescription on the client. The MapFunctionality uses this MapDescription to interact with the mapping capability of the ArcGIS Server map server object, such as drawing a new map image. The MapFunctionality MapDescription stores the Map control state, while the MapResourceLocal MapDescription stores the resource state, which can be shared by any MapFunctionality that uses the resource. By default, each MapFunctionality uses its MapDescription to manage the state. In either case, the MapResourceLocal instance uses the MapServerDcomProxy class to create server context and manage stateless interaction with the map server object via the IRequestHandler interface. MapResourceLocal also provides access to fine-grained ArcObjects on the server. A reference to the MapServer object via a COM proxy is available via the MapServer property. Server context is available via the ServerContextInfo class.
In the single-source Web ADF, you can create a WebMap from a Map control to work with a map server object via ArcObjects COM proxy classes. The application stores the Map control state by serializing and deserializing a MapDescription via an ArcObjects COM proxy. Similar to the MapResourceLocal class in the multi-source Web ADF, WebMap provides access to the MapServer and server context via COM proxies to ArcObjects on the server.
See the following illustration that shows a single-source Web ADF with a WebMap created from a Map control and the MapResourceLocal class in the multi-source Web ADF: