Occasionally when my Silverlight (4) API (v3.1) app starts, I get the following exception:Source: MapApp.OnUnhandledException() Message: Mix spatial references are not supported. Parameter name: Envelope.Union at ESRI.ArcGIS.Client.Geometry.Envelope.Union(Envelope extent) at ESRI.ArcGIS.Client.LayerCollection.GetFullExtent() at ESRI.ArcGIS.Client.Map.Layers_LayersInitialized(Object sender, EventArgs args) at ESRI.ArcGIS.Client.LayerCollection.LayersInitializedHandler.Invoke(Object sender, EventArgs args) at ESRI.ArcGIS.Client.LayerCollection.calculateLevelScheme(Boolean raiseInitialized) at ESRI.ArcGIS.Client.LayerCollection.layer_OnInitialized(Object sender, EventArgs args) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at ESRI.ArcGIS.Client.Layer.OnInitialized(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.FeatureLayer.initialize() at ESRI.ArcGIS.Client.FeatureLayer.featureLayerInfo_OutputReady(Object sender, EventArgs e) at ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo.OnReady(EventArgs e) at ESRI.ArcGIS.Client.FeatureService.FeatureLayerInfo.Execute_Completed(Object sender, DownloadStringCompletedEventArgs e) at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e) at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
You can see from the stack trace that the exception originates inside an API class, not in my code. I never call Union() myself.This happens at app startup. When it happens, I simply reload the page so that app startup starts over. it may happen a half dozen times in a row, then the app starts fine. Other times the app starts fine the first go.The actual spatial references of my layers are all the same. But apparently sometimes they don't load correctly and appear different?Any ideas on how I can handle this without my app completely blowing up?Thanks, MC