日期:2014-05-17  浏览次数:20603 次

网站在本地机上运行正常,上传到服务器上出现错误。
Server Error in '/' Application.
--------------------------------------------

Index was outside the bounds of the array. 
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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace: 


[IndexOutOfRangeException: Index was outside the bounds of the array.]
  DB_ORMapping.baseMapping.AddToFields() +139
  Consume2008.Logic.UserManager.CheckUser(String userid, String pass, String& storeid) +40
  _Default.loginPageButton_Click(Object sender, EventArgs e) +81
  System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs e) +105
  System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +115
  System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
  System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
  System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

 


--------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 
很急,哪位高手帮忙看一下。

------解决方案--------------------
数组越界了

检查你CheckUser的代码
------解决方案--------------------

Index was outside the bounds of the array =》索引值超出了数组界限 
检查下程序吧
你服务器什么环境?
------解决方案--------------------
看起来是代码的问题

DB_ORMapping.baseMapping.AddToFields() +139
Consume2008.Logic.UserManager.CheckUser(String userid, String pass, String& storeid)

从错误看应该是数据库版本不对,看看你的服务器和本地的数据库有什么不同,尤其是user相关的表或者stored procedure.