2

该网站正在运行带有 MVC 3、Entity Framework 和 Ninject 的 .Net 4。此错误随机出现,我们只能在负载测试或生产中检测到它。在开发中从未见过它。

堆栈跟踪:

   9/12/2012 12:35:19 PM: An item with the same key has already been added.
   HttpContext.Current.Request.Url.AbsoluteUri: http://www.website.com/
   HttpContext.Current.Request.QueryString: 
   HttpContext.Current.Request.Url.AbsolutePath: /
   HttpContext.Current.Request.UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; .NET CLR 1.1.4322; .NET4.0E)
   HttpContext.Current.Request.UserHostAddress: 98.174.239.230
   StackTrace:
       at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
      at System.Data.Objects.ObjectStateManager.AddEntityEntryToDictionary(EntityEntry entry, EntityState state)
      at System.Data.Objects.ObjectStateManager.AddEntry(IEntityWrapper wrappedObject, EntityKey passedKey, EntitySet entitySet, String argumentName, Boolean isAdded)
      at System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly[TEntity](Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet)
      at lambda_method(Closure , Shaper )
      at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
      at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
      at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
      at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
      at ASP._Page_Views_Shared__NavCategoryPartial_cshtml.Execute() in d:\Website\Views\Shared\_NavCatPartial.cshtml:line 30
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
      at ASP._Page_Views_Home_Index_cshtml.<Execute>b__4() in d:\Website\Views\Home\Index.cshtml:line 9
      at System.Web.WebPages.WebPageBase.<>c__DisplayClassb.<RenderSection>b__9(TextWriter tw)
      at System.Web.WebPages.WebPageBase.Write(HelperResult result)
      at ASP._Page_Views_Shared__Layout_cshtml.Execute() in d:\Website\Views\Shared\_Layout.cshtml:line 57
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
      at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
      at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
      at System.Web.WebPages.WebPageBase.Write(HelperResult result)
      at System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body)
      at System.Web.WebPages.WebPageBase.PopContext()
      at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
      at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
      at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
      at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
      at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
      at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
      at System.Web.Mvc.Controller.ExecuteCore()
      at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
      at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
      at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
      at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
      at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
      at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
4

0 回答 0