laptop and a wrench

Bug

An ArcEngine application with custom code crashes if the internet is disconnected while the application is still running.

Last Published: October 14, 2014 ArcGIS for Desktop
Bug ID Number NIM067666
SubmittedApril 28, 2011
Last ModifiedJune 5, 2024
Applies toArcGIS for Desktop
Version found10.0
StatusWill Not Be Addressed

Additional Information

Contact Esri Support if this is still an issue

Workaround

Please find the code to check the connectionType of the MXD loaded in mapControl.----------------------------------------------public override void OnClick() { // TODO: Add Command1.OnClick implementation IMapDocument pMxdoc; pMxdoc = (IMapDocument) new MapDocumentClass(); String MXDPath; MXDPath = @"<a href="file:D:/Amruta_Test/World_Street_Map.mxd" target="_blank">D:\Amruta_Test\World_Street_Map.mxd</a>"; pMxdoc.Open(MXDPath,""); ILayer lyr; lyr = (ILayer)pMxdoc.ActiveView.FocusMap.get_Layer(0); IMapServerLayer msLyr; IAGSServerObjectName soName; String docName; String mapName; if (lyr is IMapServerLayer) { msLyr = (IMapServerLayer)lyr; msLyr.GetConnectionInfo(out soName, out docName, out mapName); Int32 connectionconstant; connectionconstant = (Int32)soName.AGSServerConnectionName.ConnectionType; // If ConnectionType = 2 :Internet connection if (connectionconstant.Equals(2)) { System.Windows.Forms.MessageBox.Show("This ArcMap Document is accessing data from Internet Connection"); } // If ConnectionType = 1 :Local connection if (connectionconstant.Equals(1)) { System.Windows.Forms.MessageBox.Show("This ArcMap Document is accessing data from LAN/Local Connection"); } } }----------------------------------------------------------------

Steps to Reproduce

Bug ID: NIM067666

Software:

  • ArcGIS for Desktop

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options