English

Error: Application Error - Object reference not set to an instance of an object

Error Message

When using a Web Mapping Application built with the 9.3 .NET Web ADF, clicking the FullExtent button or using the ZoomTo/PanTo options on a task result can crash the application with the following error:

"Application Error

Object reference not set to an instance of an object.

ESRI.ArcGIS.ADF.Web.Geometry.TransformationParams..ctor(Envelope extent,
Int32 viewWidth, Int32 viewHeight, Double mapRotationInDegrees,
TransformationDirection direction, SpatialReference spatialReference) at
ESRI.ArcGIS.ADF.Web.UI.WebControls.OverviewMap.getTransformationParams
(TransformationDirection direction)"

Cause

The OverviewMap's OverviewMapResource property is not set to a valid resource item.

This can easily occur when the map resource item that the OverviewMap is set to display is renamed or deleted in the MapResourceManager.

Solution or Workaround

  1. Open the Web application in Visual Studio.
  2. Select the OverviewMap control.
  3. In the Property Window, set the OverviewMapResource property to a valid map resource item that is listed in the MapResourceManager.