嗨我有一个问题,在网站上调试问题。一切工作在本地,本地和服务器数据库是相同的 关于错误的奇怪之处在于它指向我的本地开发机器在错误堆栈中。是疯了还是什么,这些文件发布并托管在服务器机器上,错误指向我本地开发框上的一行代码。我觉得我正在失去这个阴谋。有人可以帮助清空这里,因为这是非常奇怪的疯狂asp.net错误
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: index 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: [ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index] System.Collections.ArrayList.get_Item(Int32 index) +10066148 System.Collections.Specialized.NameObjectCollectionBase.BaseGet(Int32 index) +17 System.Web.HttpFileCollection.get_Item(Int32 index) +9 System.Web.HttpFileCollectionWrapper.get_Item(Int32 index) +18 PitchPortal.Web.Binders.DocumentModelBinder.ValidateAndAssignPostedFile(ControllerContext controllerContext, ModelBindingContext bindingContext, Document doc) in C:\Users\Bich Vu\Documents\Visual Studio 2008\Projects\PitchPortal\PitchPortal.Web\Binders\DocumentModelBinder.cs:73 PitchPortal.Web.Binders.DocumentModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) in C:\Users\Bich Vu\Documents\Visual Studio 2008\Projects\PitchPortal\PitchPortal.Web\Binders\DocumentModelBinder.cs:45 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor) +404 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext, ActionDescriptor actionDescriptor) +140 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +658084 System.Web.Mvc.Controller.ExecuteCore() +125 System.Web.Mvc.c__DisplayClass8.b__4() +48 System.Web.Mvc.Async.c__DisplayClass1.b__0() +21 System.Web.Mvc.Async.c__DisplayClass8`1.b__7(IAsyncResult _) +15 System.Web.Mvc.Async.WrappedAsyncResult`1.End() +85 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +51 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +454 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263
如果你在本地机器上编译它,那就是堆栈跟踪将显示源文件中位置的内容。该源代码甚至可能不在您的服务器上,您可以部署这些DLL。 – 2010-05-14 18:38:51
如果没有源代码,堆栈跟踪并不是很有启发性,你可以发布你的代码。 当您将调试代码部署到其他机器上时,您经常会像堆栈跟踪中那样获取文件引用,我认为将编译该dll的机器上的源代码路径存储在符号文件中。 – 2010-05-14 18:39:59