laptop and a wrench

不具合

Session state in SQL Server causes the switch of visibility of map resource item to fail.

最後に公開された状態: August 25, 2014 No Product Found
不具合 ID 番号 NIM008710
送信されましたMay 8, 2007
最終更新日June 5, 2024
適用対象No Product Found
見つかったバージョン9.2
ステータスWill Not Be Addressed

参考情報

No Public Explanation

対処法

Objects stored in session state must be serializable if the mode is SQL Server. It's not very clear if ESRI web controls save unserializeable objects into session variables.Two workarounds were sent to the user.1. Remove all resource items and only add that single map resource item that should be visible.2. Turn off all layers inside those map resource items that should be invisible. Only layers in one resource item is set visible.Here is the code snippet for workaround 2: private void SetLayersVisibility(int resource_index, bool visibleSetting) { ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality mf = (ESRI.ArcGIS.ADF.Web.DataSources.IMapFunctionality)Map1.GetFunctionality(resource_index); ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality ags_mf = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapFunctionality)mf; //ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceBase ags_mr = (ESRI.ArcGIS.ADF.Web.DataSources.ArcGISServer.MapResourceBase)qfunc.Resource; ESRI.ArcGIS.ADF.ArcGISServer.MapDescription mapdescription; mapdescription = ags_mf.MapDescription; ESRI.ArcGIS.ADF.ArcGISServer.LayerDescription[] layerdescs = mapdescription.LayerDescriptions; for (int layer_index = 0; layer_index < layerdescs.Length; layer_index++) { ESRI.ArcGIS.ADF.ArcGISServer.LayerDescription featureLayer = layerdescs[layer_index]; featureLayer.Visible = visibleSetting; } } private string SwitchMapService(string serviceName) { for (int resource_index = 0; resource_index < MapResourceManager1.ResourceItems.Count; resource_index++) { if (MapResourceManager1.ResourceItems[resource_index].Name != serviceName) { SetLayersVisibility(resource_index, false); } else { SetLayersVisibility(resource_index, true); } } Map1.Refresh(); Toc1.Refresh(); Map1.CallbackResults.AddRange(Toc1.CallbackResults); string mapcallbackresults = Map1.CallbackResults.ToString(); return mapcallbackresults; }

再現の手順

不具合 ID: NIM008710

ソフトウェア:

  • No Product Found

バグのステータスが変更されたときに通知を受け取る

Esri Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動