我做了个手机网站,在本地XP的系统环境下是OK的,但是放到服务器上后,就出现、myMap = MapInfo.Engine.Session.Current.MapFactory[0]; 读不到配置文件中地图的问题报错情况如下:
Server Error in '/' Application.
--------------------------------------------------------------------------------Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: indexSource Error: 
Line 69:         {
Line 70: 
Line 71:             myMap = MapInfo.Engine.Session.Current.MapFactory[0];
Line 72:         }
Line 73:         return myMap;
 Source File: f:\wapgis\WebSite15\map.aspx.cs    Line: 71 Stack Trace: 
[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.Collections.CollectionBase.System.Collections.IList.get_Item(Int32 index) +2429217
   MapInfo.Mapping.MapFactory.get_Item(Int32 index) +39
   Default2.GetMapObj() in f:\wapgis\WebSite15\map.aspx.cs:71
   Default2.Page_Load(Object sender, EventArgs e) in f:\wapgis\WebSite15\map.aspx.cs:28
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.MobileControls.MobilePage.OnLoad(EventArgs e) +138
   System.Web.UI.Control.LoadRecursive() +47
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 配置文件中的地图路径都是正确的,可是就是读不到 不知道什么原因,望高手指点~~~!