我有一個使用MVC3 Razor製作的Web應用程序。在Windows Server 2008 r2中運行應用程序時,給定的鍵不存在於字典錯誤中
應用程序正常啓動的瀏覽器,但把一些值後的文本框&點擊搜索按鈕,我得到錯誤的
「給定的關鍵是不存在的字典」。
這隻發生在Windows Server 2008 R2中。在其他操作系統,如Windows 7,Windows Server 2008 SP1中,它工作正常。
下面是堆棧跟蹤
[KeyNotFoundException: The given key was not present in the dictionary.]
System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12686831
CVR_Prototype.Controllers.HomeController.CvrDetailsCompleted() +171
lambda_method(Closure , ControllerBase , Object[]) +79
System.Web.Mvc.Async.<>c__DisplayClass7.<BeginExecute>b__5(IAsyncResult asyncResult) +288
System.Web.Mvc.Async.<>c__DisplayClass41.<BeginInvokeAsynchronousActionMethod>b__40(IAsyncResult asyncResult) +22
System.Web.Mvc.Async.<>c__DisplayClass3b.<BeginInvokeActionMethodWithFilters>b__35() +129
System.Web.Mvc.Async.<>c__DisplayClass51.<InvokeActionMethodFilterAsynchronously>b__4b() +810887
System.Web.Mvc.Async.<>c__DisplayClass51.<InvokeActionMethodFilterAsynchronously>b__4b() +810887
System.Web.Mvc.Async.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__38(IAsyncResult asyncResult) +15
System.Web.Mvc.Async.<>c__DisplayClass2c.<BeginInvokeAction>b__22() +33
System.Web.Mvc.Async.<>c__DisplayClass27.<BeginInvokeAction>b__24(IAsyncResult asyncResult) +811468
System.Web.Mvc.<>c__DisplayClass19.<BeginExecuteCore>b__14(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.Mvc.AsyncController.EndExecuteCore(IAsyncResult asyncResult) +67
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.Mvc.AsyncController.EndExecute(IAsyncResult asyncResult) +53
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__4(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20
System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +136
這正是我解決我的問題。 – 2012-08-02 12:01:07