laptop and a wrench

漏洞

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

上次发布: October 14, 2014 ArcGIS for Desktop
漏洞 ID 编号 NIM067666
已提交April 28, 2011
上次修改时间June 5, 2024
适用范围ArcGIS for Desktop
找到的版本10.0
状态Will Not Be Addressed

附加信息

Contact Esri Support if this is still an issue

解决办法

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

重现步骤

漏洞 ID: NIM067666

软件:

  • ArcGIS for Desktop

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项