Posted by: Jeff Germain | July 4, 2012

BAO API for Flex and ArcGIS API for Flex 3.0

As of this writing, the latest BAO API for Flex (2.2) is not compatible with ArcGIS API for Flex 3.0. Reports fail with the following runtime error:

ReferenceError: Error #1065: Variable com.esri.ags.utils::JSON is not defined.

Until the BAO API for Flex team releases a new version here is a workaround that has worked for me. Basically, I created the missing JSON class in the required package. Here we are simply forwarding encode/decode requests to the new JSONUtil class.

So, add the following class to your Flex project. NOTE the package! Build your project and run. The BAO API should now use this class without issue. I’ve tested on a limited number of report types so let me know if anyone runs into a case where this doesn’t work.

package com.esri.ags.utils { /** * Stopgap class to enable BAO API for Flex 2.2 to run in ArcGIS API for Flex 3.0 project. * @author jgermain * */ public class JSON extends Object { public function JSON() { super(); } public static function encode(object:Object):String { return JSONUtil.encode(object); } public static function decode(string:String):* { return JSONUtil.decode(string); } } }

 

Enjoy!

Posted by: Jeff Germain | August 3, 2011

Validating Edit Operations with ArcGIS Flex API

FeatureLayer edits at ArcGIS Flex API 2.4 and below are live. That is, if you move a vertex or modify a field value the underlying FeatureClass is updated instantly. Here’s a quick and dirty way to validate edit operations forcing the user to accept or cancel their edit actions. Note a myriad of ways to implement edit validation exist out there, this is just one of them.

For this example I’ll handle delete operations and get confirmation from the user before the edits are committed to the server. I’ll also use some Esri sample services.

Workflow:  Select one or more fire perimeters and press the Delete button on the attribute inspector OR click Delete key. Choose Yes or No in the confirmation dialog. As shown in the following figure.

confirm_deletes

The code to make this work is pretty simple. Essentially, clicking delete raises the editsStarting event on the fire perimeters featurelayer. This event occurs before edits have been sent to the server. In this event handler we first clone the event, then cancel the event. We clone and cancel the event so that we can send the edits to the server ONLY if user OK’s the action. Then we pop a dialog to get user confirmation. Based on dialog result, we call applyEdits passing in the deleted features from the cloned event. Done.

See the code below for details.

ValidateEditsDemo.mxml (Download here)
   1: <?xml version="1.0" encoding="utf-8"?>

   2: <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"

   3:                xmlns:s="library://ns.adobe.com/flex/spark"

   4:                xmlns:esri="http://www.esri.com/2008/ags"

   5:                initialize="application_initializeHandler(event)"

   6:                pageTitle="Validate Edits Demo">    

   7:     <s:layout>

   8:         <s:HorizontalLayout/>

   9:     </s:layout>

  10:     

  11:     <fx:Style>

  12:         @namespace esri "http://www.esri.com/2008/ags";

  13:         

  14:         esri|InfoWindow

  15:         {

  16:             background-color : #FFFFFF;

  17:             border-thickness : 2;

  18:         }

  19:     </fx:Style>

  20:     

  21:     <fx:Script>

  22:         <![CDATA[

  23: import com.esri.ags.Graphic;

  24: import com.esri.ags.events.FeatureLayerEvent;

  25: import com.esri.ags.tasks.GeometryService;

  26:  

  27: import mx.controls.Alert;

  28: import mx.events.CloseEvent;

  29: import mx.events.FlexEvent;

  30:  

  31: protected function application_initializeHandler(event:FlexEvent):void

  32: {

  33:     myEditor.featureLayers = [ fireAreas ];

  34: }

  35:  

  36: private var _confirmDeletes:Boolean = true;

  37:  

  38: protected function fireAreas_editsStartingHandler(event:FeatureLayerEvent):void

  39: {

  40:     if(event.deletes && event.deletes.length > 0)

  41:     {

  42:         if(_confirmDeletes)

  43:         {

  44:             // Clone this event, then cancel it so we can get user 

  45:             // confirmation and apply edits later

  46:             const eventClone:FeatureLayerEvent = 

  47:                 event.clone() as FeatureLayerEvent;

  48:             

  49:             // Cancel event

  50:             event.preventDefault();

  51:             

  52:             // List OIDs

  53:             var oids:String = "";

  54:             var oid:String;

  55:             for each (var g:Graphic in event.deletes)

  56:             {

  57:                 oid = g.attributes.objectid.toString();

  58:                 oids = (oids.length == 0) 

  59:                     ? oid : oids + ", " + oid;

  60:             }

  61:             

  62:             // Confirm deletes

  63:             const msg:String = 

  64:                 "Are you sure you want to delete these features?\n" +

  65:                 "OBJECTIDs: " + oids;

  66:             const title:String = 

  67:                 (event.deletes.length > 1) ? "Confirm Deletes" : "Confirm Delete";

  68:             Alert.show(msg, title, 3, this, confirmHandler);

  69:             

  70:             function confirmHandler(closeEvent:CloseEvent):void

  71:             {

  72:                 if(closeEvent.detail == Alert.YES)

  73:                 {

  74:                     // Apply edits without confirmation

  75:                     _confirmDeletes = false;

  76:                     eventClone.featureLayer.applyEdits(null, null, eventClone.deletes);

  77:                 }

  78:             }

  79:         }

  80:         else

  81:         {

  82:             // Reset confirmation flag

  83:             _confirmDeletes = true;

  84:         }

  85:     }    

  86: }

  87:         ]]>

  88:     </fx:Script>

  89:     

  90:     <s:VGroup width="328" height="100%">

  91:         <esri:Editor id="myEditor"

  92:                      geometryService="{new GeometryService('http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer')}"

  93:                      map="{myMap}"

  94:                      toolbarVisible="true"/>

  95:         <s:Rect height="100%"/>

  96:     </s:VGroup>

  97:     <esri:Map id="myMap" wrapAround180="true">

  98:         <esri:extent>

  99:             <esri:Extent id="sheepfire"

 100:                          xmin="-13144000" ymin="4033000" xmax="-13066000" ymax="4099000">

 101:                 <esri:SpatialReference wkid="102100"/>

 102:             </esri:Extent>

 103:         </esri:extent>

 104:         <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>

 105:         <esri:FeatureLayer id="fireAreas"

 106:                            mode="snapshot"

 107:                            outFields="*"

 108:                            url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/2"

 109:                            editsStarting="fireAreas_editsStartingHandler(event)"/>

 110:     </esri:Map>

 111:     

 112: </s:Application>

ValidateEditsDemo.mxml (Download here)

Let me know what other ways you’ve implemented edit validation!

Posted by: Jeff Germain | May 5, 2011

Bug in ArcGIS API for Flex InfoWindow Workaround

Update:  I’ve added examples for ArcGIS Viewer API for Flex 2.4 and 2.3.1 at the bottom of this post

I’m a big fan of the new PopUpRenderer and ability to use popups on an ArcGISDynamicMapServiceLayer with little code. They’re especially nice when working within an ArcGIS Viewer for Flex app as they’re so configurable. However, I’ve discovered one wrinkle though. The layer does not clear the title (infoWindow.label) property, thus retaining any previous title. The default PopUpRenderer does not use the infoWindow.label property. It simply ignores it. Take the following examples.

First, I’ll click on a graphic, a tweet in this case. The tweet content is actually a component instance that is set via map.infoWindowContent. We also set the map.infoWindow.label with the tweet owner.

infowindow_tweet

Next, we click on a feature from an ArcGISDynamicMapServiceLayer which displays the popup using the configured PopUpRenderer. Notice the tweet title is persisted. This is regardless if we close the InfoWindow and click another feature. And this isn’t limited to ArcGISDynamicMapServiceLayers. FeatureLayers are affected too.

infowindow_popuprenderer

The application I’m developing makes heavy use of the map’s InfoWindow class. So, I wanted to resolve this bug with as few lines of code as possible and in one single location if possible.

Here’s what I did. Once the map is initialized, I add a listener to its infoWindow.content property. Since the InfoWindow only exposes the close event, I had to use a ChangeWatcher to keep an eye on the content property.

// Edits to fix bug in InfoWindow/PopUpRenderer that 
//does not clear out InfoWindow.label property
ChangeWatcher.watch(map.infoWindow, "content",
                     infoWindowContentChangeHandler);

When the content property changes I check to see if the content is of type PopUpRenderer. Because the PopUpRenderer does not use the InfoWindow.label property, I clear it.

private function infoWindowContentChangeHandler(event:Event):void
{
  if(map.infoWindow.content is PopUpRenderer)
  {
    map.infoWindow.label = "";
  }
}

Fixed. Though now we have the added hassle of remembering to tote this along to future projects until Esri addresses it.

Update:  ArcGIS Viewer API for Flex 2.3.1 and 2.4 

Insert code into the MapManager.mxml file

2.4 –

At 2.4, insert code into the existing method this_creationCompleteHandler and add additional handler as follows:

private function this_creationCompleteHandler():void
{
existing esri code…

… then

// Edits to fix bug in InfoWindow/PopUpRenderer that
// does not clear out InfoWindow.label property
// This is more of a defensive move!
ChangeWatcher.watch(map.infoWindow, “content”, infoWindowContentChangeHandler);
}

private function infoWindowContentChangeHandler(event:Event):void
{
map.infoWindow.label = “”;
}

2.3.1 –

At 2.3.1, insert code into the existing method init and add additional handler as follows:

private function init():void
{
existing esri code…

… then

// Edits to fix bug in InfoWindow/PopUpRenderer that
// does not clear out InfoWindow.label property
// This is more of a defensive move!
ChangeWatcher.watch(map.infoWindow, “content”, infoWindowContentChangeHandler);
}

private function infoWindowContentChangeHandler(event:Event):void
{
map.infoWindow.label = “”;
}

Posted by: Jeff Germain | May 3, 2011

Consuming Esri’s new Landsat ImageServices in Flex

Esri’s recent release of world-wide Landsat data via image services is pretty sweet. Sweeter yet are the apps built around those services to compare and explore them. To get the most out of those services you’ll want to take advantage of the MosaicRule property on the ArcGISImageServiceLayer. The mosaic rule allows you to control which rasters should be rendered, their ordering, and how overlapping pixels are resolved between rasters.

Here’s an example pulling in their Healthy Vegetation dataset. First, we’ll spin up the layer.

var url:String = 
  "http://imagery.arcgisonline.com/arcgis/rest/services/LandsatGLS/HealthyVegetation/ImageServer";
var imageLayer:ArcGISImageServiceLayer = new ArcGISImageServiceLayer(url);
imageLayer.id = "HealthyVegetation";

Next, we’ll apply the mosaic rule.

UPDATE:  The latest version of the ArcGIS API for Flex 2.3.1 fixes issues with the MosaicRule. Previously, properties not set were sent along to the REST API as “null” values which are not currently supported. Now, null properties are no longer sent to the REST API.

var rule:MosaicRule = new MosaicRule();
rule.method = MosaicRule.METHOD_ATTRIBUTE;
rule.sortField = "AcquisitionDate";
rule.sortValue = "3000/01/01";
rule.ascending = true;                     
rule.operation = MosaicRule.OPERATION_FIRST;
rule.where = ""; // if left empty; i.e. null, REST API fails @ 10 SP1

imageLayer.mosaicRule = rule;

With this rule, we’re specifying that the most recent imagery be displayed on top. Now, these services are “time aware” and their catalogs contain imagery from 1975, 1990, 2000 and 2005 (known as epochs). So, using the code above will render imagery for the 2005 epoch on the map.

But what if we wanted to see healthy vegetation for 1990? Perhaps flip back and forth between the two epochs to compare change over time? Simple. Just tell the layer to respect the time extent on the map as follows.

imagerLayer.useMapTime = true;

Then set the timeExtent on the map manually or via the TimeSlider component.

Anyways, head over to their Landsat page and see their apps and services.

Posted by: Jeff Germain | April 23, 2010

Multiple log files with log4net in ArcGIS

If you are not currently storing your application exceptions somewhere, perhaps you should reconsider. Not only does it help you the developer debug deployment issues but it also helps the client monitor the health of your software over time. Change is inevitable; eventually database connection strings change, servers change, etc.

Log4net is the de facto .NET logging engine. While using a single logger in your application is straightforward, managing multiple loggers is less so. Here’s an example of how to maintain two log files in one application; one log for exceptions and the other for runtime events that may be presented to the user. It is actually based on a real set of requirements I had from a client as outlined below.

To skip the real-world implementation overview, scroll down to the Sample Source Code section.

Requirements

  • Built for ArcMap 9.3.1
  • Tools to load data from a personal geodatabase or file geodatabase to an ArcSDE enterprise geodatabase
  • Ability to map fields from source featureclasses to target SDE featureclasses
  • Ability to choose source featureclasses from layers in the map
  • Load results must be presented to the user as well as the details stored in a log file
  • etc…

Solution

Build an ArcMap toolbar with commands and an extension to manage it all. Use Log4net to log exceptions and load events to separate log files.

I won’t rehash how to set up log4net for use with ArcMap. Check out Dave’s post for a good tutorial.

Featureclass Field Mappings

Field mappings per feature class were configured in an application configuration file. If a mapped field was not found to exist in either source or target feature class, then the load operation for that class was skipped and the reason logged to a load events file.

Load Events Log Example

Any issues raised during the feature load was logged to the SpatialDataLoaderLog. Log included the ObjectID for the source feature so analysts could better troubleshoot those issues.

2010-02-04 16:10:08,747 [1] [SpatialDataLoaderLog] - ERROR - Project_Line OID 5 failed to load. U09BL0211 - No matching STATE_PROJECT_NUMBER found in database.
2010-02-04 16:10:08,933 [1] [SpatialDataLoaderLog] - ERROR - Project_Polygon OID 38 failed to load. Linestring or poly boundary is self-intersecting
2010-02-04 16:10:08,942 [1] [SpatialDataLoaderLog] - ERROR - Project_Polygon OID 39 failed to load. U09UT0548 - No matching STATE_PROJECT_NUMBER found in database.

Error Log Example

Exceptions were logged to the error EventLog. This would include SDE connection issues, etc.

2010-02-20 13:42:29,492 [1] ERROR EventLog [(null)] - 
System.Runtime.InteropServices.COMException: Underlying DBMS error[Microsoft SQL Server Native Client 10.0: Login timeout expiredNo extended error.]

 
Sample Source Code

I’ve created a sample project containing an ArcMap extension, toolbar, command, and UI. It demonstrates the log4net configuration to support multiple FileAppenders, contains a basic logging helper library that wraps the log4net logger, and includes an extension that manages and exposes the loggers.

Download source code here.

Open the source projects using VS2008+ and update the ArcGIS 9.3.1 libraries to whatever version you’re running.

Build the solution.

Access the Log4Net Sample Extension toolbar

sample_toolbar

The Log4Net Sample command and UI

sample_command_ui 

The log4net configuration uses FileAppenders but could easily be modified to use any of the supported Appenders.

Enjoy logging with log4net!

Posted by: Jeff Germain | January 20, 2010

Default draw symbology in the ESRI Flex Starter Kit

If you have used ESRI’s Flex Starter Kit you may have noticed an annoying feature when sketching graphics on the map via your custom widgets or their DrawWidget. When sketching a polygon, it requires 2 vertices before the sketch is drawn on the map. This only confuses your users as they are not sure their sketch has begun.

Anyways, it’s a simple fix… 2 lines of code. In MapManager::config() method, the Draw object is instantiated. Insert code to set default fillSymbol, lineSymbol, and markerSymbol. Here’s how:

drawToolbar = new Draw();

drawToolbar.map = map;            

drawToolbar.addEventListener(DrawEvent.DRAW_END, onDrawEnd);

// DTSAgile: Add default symbols so polygons are visible from first click when drawing

drawToolbar.lineSymbol = new SimpleLineSymbol("solid",0x333333, .8, 1);                    

drawToolbar.fillSymbol = new SimpleFillSymbol("solid", 0x333333, 0.15, new SimpleLineSymbol("solid",0x333333, .8, 1));                        

// drawToolbar.markerSymbol - add here...

// End DTSAgile edits

Note: This certainly isn’t limited to the ESRI Flex Starter Kit. This will occur anytime you try to draw a polygon using the Draw object and default symbols have not been set.

The likely culprit in all this is ESRI’s Flex API for Draw(). It does not seem to set the outline symbol for the fillSymbol. Thus, there is no area to fill until 2 vertices have been added to your sketch, and no outline symbol to show you where you started your sketch!

Posted by: Jeff Germain | December 22, 2009

Validating PDF Documents

So I’m just wrapping up a project where I had to generate PDF reports involving ArcGIS Server, ASP.NET MVC, and web services. I’ll do a post on how I rolled it all together later. But first, let’s look at this nugget… how to validate the PDFs being generated.

The PDF library I used was iTextSharp, which was great. I would suggest getting the book “iText In Action” if you’re short on time (here or at Amazon). Otherwise, you’ll be doing more trial and error than necessary. Another valuable resource is the outdated tutorials.

So, everything is working great on my dev box and on my server. However, my client was reporting this issue when attempting to open the report… they’re using Adobe Acrobat 8.1.6, while I’m using 9.0

“An Error exists on this page. Acrobat may not display the page correctly. Please contact the person who created the PDF document to correct the problem.”

Ouch! That doesn’t look good.

I wasn’t able to reproduce the issue using Adobe Reader or Foxit Reader. So I researched how to validate the PDF. iTextSharp doesn’t offer any way to do this, but the FREE trial version of Adobe Acrobat (9) does. It offers the program Preflight which can analyze your PDF in all sorts of ways. So I had my client send me a PDF they generated using our application which I analyzed using Preflight, specifically Report PDF syntax issues.

Preflight Run this gem, then save the results to a PDF. I sent those results to my client. Turns out it was their installation of Adobe Acrobat. Doh!

Preflight_Report

Anyways, a great tool and handy when generating PDFs using a low-level library like iTextSharp.

I had to download the Trial version of Adobe Acrobat 9.

Posted by: Jeff Germain | December 16, 2009

Debugging Server Object Extensions

Not sure how I missed this one, but Dave just turned me onto it. Simon, over at Map Butcher, did a great post a while back on how to debug server object extensions in Visual Studio. Check it out here and say good-bye to “debugging” using log files.

So, to roll with this using the post-build event configuration in my previous post, you’ll need to copy over the your SOE’s debug file (.pdb). Do it manually from the bin\debug folder, or add it to the post-build event as follows:

   1: IF EXIST $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll (

   2:     $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll

   3: )

   4: IF EXIST $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll (

   5:     $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll

   6: )

   7:  

   8: SC STOP ArcServerObjectManager

   9: ping -n 5 localhost > NUL

  10:  

  11: DEL $(SolutionDir)_install_ComUtilities\*.dll

  12: DEL $(SolutionDir)_install_ComUtilities\*.tlb

  13: DEL $(SolutionDir)_install_ComUtilities\*.pdb

  14: DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt

  15:  

  16: COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll

  17: IF $(ConfigurationName)==Debug (

  18:     COPY $(TargetDir)$(TargetName).pdb $(SolutionDir)_install_ComUtilities\$(TargetName).pdb

  19: )

  20: ping -n 2 localhost > NUL

  21: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase

  22: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase

  23:  

  24: SC START ArcServerObjectManager

What’s new?

Line 1 & 4:  To avoid errors I’ve added a check to unregister DLLs only if they exist.

Line 13:  Delete any debug files from output directory.

Line 17:  If SOE’s build is configured for “Debug”, then copy only the SOE’s debug file to the output directory.

That’s it. Now you’re ready to debug your SOE.

Happy debugging!

Posted by: Jeff Germain | December 12, 2009

Post-build Event for Custom Server Object Extensions

While developing ArcGIS Server Object Extensions, I typically run a post-build event in the SOE Visual Studio project to copy the DLL and it dependencies to an output folder outside of the actual Visual Studio project. It is there that I perform the COM registration using REGASM. Until today I have relied on BAT files to do the work for me; uninstall and install. Vish has provided a great VS template for building SOEs you can get here and provided a nice talk at the ESRI dev summit.

To streamline the process, I have created a post-build event to take care of all the work for me. Here’s the script.

   1: $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll

   2: $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll

   3:

   4: SC STOP ArcServerObjectManager

   5: ping -n 5 localhost > NUL

   6:

   7: DEL $(SolutionDir)_install_ComUtilities\*.dll

   8: DEL $(SolutionDir)_install_ComUtilities\*.tlb

   9: DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt

  10:

  11: COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll

  12:

  13: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase

  14: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase

  15:

  16: SC START ArcServerObjectManager

What’s going on?

* Unregister existing .NET assemblies with COM

   1: $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll

   2: $(SolutionDir)_install_ComUtilities\regasm /unregister $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll

* Stop the ArcGIS Server Object Manager process and wait 5 seconds while it shuts down. Stopping the SOM kills all SOC processes that have locks on our SOE DLL.

   1: SC STOP ArcServerObjectManager

   2: ping -n 5 localhost > NUL

* Delete DLL, TLB, and custom log files

   1: DEL $(SolutionDir)_install_ComUtilities\*.dll

   2: DEL $(SolutionDir)_install_ComUtilities\*.tlb

   3: DEL $(SolutionDir)_install_ComUtilities\Logs\*.txt

* Copy fresh DLLs to this directory

   1: COPY $(TargetDir)*.dll $(SolutionDir)_install_ComUtilities\*.dll

* Register those .NET assemblies with COM

   1: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOE.tlb /codebase

   2: $(SolutionDir)_install_ComUtilities\regasm $(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.dll /tlb:$(SolutionDir)_install_ComUtilities\CDOT.ArcGisServer.SOEs.LrsSOEInterface.tlb /codebase

* Restart the ArcGIS Server Object Manager

   1: SC START ArcServerObjectManager

Of course, I’ll build an installer for the final delivery to the client.

Posted by: Jeff Germain | September 15, 2009

Issues upgrading ArcGIS Server 9.3 to 9.3.1

Yesterday I ran into issues upgrading my developer box from 9.3 SP1 to 9.3.1. I’m running Windows Server 2008. No problems upgrading ArcGIS Desktop. However, after completing the post install of server I was no longer able to browse to my local services via http://localhost/arcgis/rest/services. In fact, my entire ArcGIS instance folder located under wwwroot was gone!

So I uninstalled ArcGIS Server completely and reinstalled ArcGIS Server 9.3. This time the instance folder was created, but inside the rest folder, the rest.config file did not contain my server information. Instead all those fields were empty, explaining the “Server Host cannot be null” error received when trying to browse to the services directory.

20090915_AGS_Error

After burning an afternoon trying to upgrade, I did finally succeed. The silver bullet? Well, several things:

  • Delete folder c:\arcgisserver
  • Delete all folders from C:\Program Files (x86)\ArcGIS\server\user\cfg
  • Delete all files from C:\Program Files (x86)\ArcGIS\server\user\log
  • Remove the arcsom, arcsoc, and arcwebservices users from both agsadmin and agsusers groups created during post install. DO NOT delete those groups!

Additional resources that may address your flavor of install issue:

Older Posts »

Categories