In our application we allow user to add services dynamically by providing URL to the service.
It works fine if user will put correct url, it will raise InitializationFailed event if user will put any correct URI but not real service url and etc...
But in case of ArcGISDynamicMapServiceLayer class - if user will put URL to the particular layer (e.g. "service url"/0), not to the service, API will not raise any events (e.g. ArcGISDynamicMapServiceLayer.Initialized or ArcGISDynamicMapServiceLayer.InitializationFailed) but throw an exception:
Object reference not set to an instance of an object.
at ESRI.ArcGIS.Client.ArcGISDynamicMapServiceLayer.MapServiceInfoInitialized(Object sender, MapServiceInitalizeArgs args)
at ESRI.ArcGIS.Client.Services.MapService.OnInitialized(MapServiceInitalizeArgs args)
at ESRI.ArcGIS.Client.Services.MapService.wc_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e)
at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
So the question is: is it known bug or my mistake in the code? if it is a bug what is the bug ID number?