HOW TO

Migrate applications from ArcIMS .Net Link to ArcIMS 9.2 API for .Net 2.0

Last Published: April 25, 2020

Summary

The ArcIMS 9.2 Web ADF contains a full featured ArcIMS API for Microsoft .Net 2.0 Framework. The ArcIMS 9.2 API sends, receives, parses, and processes ArcXML for the user, providing a set of .Net Objects to develop with the user's favorite .Net language.

Instructions provided describe the necessary steps to get the old code and applications using ArcIMS .Net Link to work with ArcIMS 9.2 API.

Procedure


Note:
ArcIMS or ArcGIS Server 9.2 ADF for the Microsoft .Net Framework is built with .Net 2.0 Framework. This article assumes that the ArcIMS or ArcGIS Server 9.2 ADF for the Microsoft .Net 2.0 Platform is installed.


The following steps illustrate the migration:

  1. If necessary, convert the project to Visual Studio 2005. The conversion is prompted by the Visual Studio Project Conversion Wizard.
  2. Remove the reference to the 'ESRI.ArcIMS.Server.dll' from the current project, if present.
  3. Add reference to the 'ESRI.ArcGIS.ADF.Connection.dll' to the current project.
  4. In the source code, remove reference to 'ESRI.ArcIMS.Server' and add reference to 'ESRI.ArcGIS.ADF.Connection.IMS'.
    Code:
    C#
    //using ESRI.ArcIMS.Server;
    using ESRI.ArcGIS.ADF.Connection.IMS;

    VB.NET
    ' Imports ESRI.ArcIMS.Server
    Imports ESRI.ArcGIS.ADF.Connection.IMS

  5. Change each reference to 'ServerConnection' to the appropriate connection type as shown below in the code:

    If using the HTTP Connection Scheme:

    Code:
    // C#
    /* Old Code using HTTP Scheme */
    ServerConnection connection = new ServerConnection(url);
    connection.Scheme = ESRI.ArcIMS.Server.Scheme.HTTP;
    connection.URIPort = 80;
    connection.ServiceName = serviceName;
    string arcxmlRespoonse = connection.Send(arcxmlRequest);

    /* New Code using HTTP Connection Type*/
    HTTPConnection connection = new HTTPConnection(url);
    connection.ServiceName = serviceName;
    string arcxmlResponse = connection.Send(arcxmlRequest);

    Code:
    ' VB.NET
    ' Old Code Imports HTTP Scheme

    Dim connection As ServerConnection = New ServerConnection(url)
    connection.Scheme = ESRI.ArcIMS.Server.Scheme.HTTP
    connection.URIPort = 80
    connection.ServiceName = serviceName
    Dim arcxmlRespoonse As String = connection.Send(arcxmlRequest)

    ' New Code Imports HTTP Connection Type

    Dim connection As HTTPConnection = New HTTPConnection(url)
    connection.ServiceName = serviceName
    Dim arcxmlResponse As String = connection.Send(arcxmlRequest)


    If using the TCP Connection Scheme:

    Code:
    // C#
    /* Old Code using TCP Scheme */
    ServerConnection connection = new ServerConnection();
    connection.Scheme = ESRI.ArcIMS.Server.Scheme.TCP;
    connection.Host = host;
    connection.URIPort = 5300;
    connection.ServiceName = serviceName;
    string arcxmlResponse = connection.Send(arcxmlRequest);

    /* New Code using TCP Connection Type */
    TCPConnection connection = new TCPConnection();
    connection.Port = 5300;
    connection.Host = host;
    string arcxmlResponse = connection.Send(arcxmlRequest);

    Code:
    ' VB.NET
    ' Old Code Imports TCP Scheme

    Dim connection As ServerConnection = New ServerConnection()
    connection.Scheme = ESRI.ArcIMS.Server.Scheme.TCP
    connection.Host = host
    connection.URIPort = 5300
    connection.ServiceName = serviceName
    Dim arcxmlResponse As String = connection.Send(arcxmlRequest)

    ' New Code Imports TCP Connection Type

    Dim connection As TCPConnection = New TCPConnection()
    connection.Port = 5300
    connection.Host = host
    Dim arcxmlResponse As String = connection.Send(arcxmlRequest)


    Once the changes are done, the existing application should work as expected.

Article ID:000009004

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic