ESRI.ArcGIS.Client.Local.LocalServerException was unhandled Message=Failed to create service clark MapServer. Service failed to initialize: IObjectConstruct::Construct (MapServer) hr=0x80043000 (ErrorInfo did not include a description) Error code: 500 Source=ESRI.ArcGIS.Client StackTrace: at ESRI.ArcGIS.Client.Layer.OnInitializationFailed(EventArgs e) at ESRI.ArcGIS.Client.Layer.Initialize() at ESRI.ArcGIS.Client.FeatureLayer.Initialize() at ESRI.ArcGIS.Client.Local.ArcGISLocalFeatureLayer.FailInitialize(Exception error) at ESRI.ArcGIS.Client.Local.ArcGISLocalFeatureLayer.CompleteServiceInitialize(LocalMapService mapService) at ESRI.ArcGIS.Client.Local.LocalMapService.<>c__DisplayClass1.<GetServiceAsyncInternal>b__0(Object s, AsyncCompletedEventArgs e) at ESRI.ArcGIS.Client.Local.LocalService.OnStartCompleted() at ESRI.ArcGIS.Client.Local.LocalService.FailStart(Exception error) at ESRI.ArcGIS.Client.Local.LocalService.<ContinueStartService>b__a(CreateServiceResponse createServiceResponse, RequestInfo createServiceInfo) at ESRI.ArcGIS.Client.Local.Internal.Requests.ProcessResponse[TExpectedResponse](String url, String queryParameters, Exception err, Boolean cancelled, String result, Action`2 callback) at ESRI.ArcGIS.Client.Local.Internal.Requests.<>c__DisplayClass7`1.<Start>b__2(Object s, UploadStringCompletedEventArgs e) at System.Net.WebClient.OnUploadStringCompleted(UploadStringCompletedEventArgs e) at System.Net.WebClient.UploadStringOperationCompleted(Object arg) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame) at System.Windows.Application.RunDispatcher(Object ignore) at System.Windows.Application.RunInternal(Window window) at System.Windows.Application.Run(Window window) at System.Windows.Application.Run() at AdvancedRuntimeControls.App.Main() in C:\Users\gfaraj\Desktop\Source_Code\AdvancedRuntimeControls\obj\Debug\App.g.cs:line 0 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
LocalMapService localMapService = new LocalMapService() { Path = @"\\dtdev7240w7\Terminated\GIS Data\clark gis\clark.mxd", MaxRecords = 100000 }; localMapService.StartAsync(localService => { if (localService.Error != null) return; ArcGISLocalDynamicMapServiceLayer layer = new ArcGISLocalDynamicMapServiceLayer(localMapService); MyMap.Layers.Add(layer); });
MyMap.Layers.Add(new ArcGISLocalFeatureLayer(@"\\dtdev7240w7\Terminated\GIS Data\clark gis\clark.mxd", "Clark"));
Solved! Go to Solution.
MyMap.Layers.Add(new ArcGISLocalFeatureLayer(@"\\dtdev7240w7\Terminated\GIS Data\clark gis\clark.mpk", "parcels"));
Failed to create service clark2 MapServer. Service failed to initialize: The map package is not supported by the ArcGIS Runtime. There is no .msd file available inside the package. Check that it was authored with ArcGIS Runtime support enabled. Error code: 500
SEVERITY STATUS CODE DESCRIPTION NAME TYPE DATA FRAME Medium Unresolved 10027 Layer's data source is referenced via a UNC path parcels Layer Layers Low Unresolved 30003 Layer draws at all scale ranges parcels Layer Layers