laptop and a wrench

Error

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

Última publicación: October 14, 2014 ArcGIS for Desktop
Número de ID del error NIM067666
EnviadoApril 28, 2011
Última modificaciónJune 5, 2024
Relacionado conArcGIS for Desktop
Versión encontrada10.0
EstadoWill Not Be Addressed

Información adicional

Contact Esri Support if this is still an issue

Solución alternativa

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"); } } }----------------------------------------------------------------

Pasos para reproducir

ID del error: NIM067666

Software:

  • ArcGIS for Desktop

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga