我有一个使用 MVC3 Razor 制作的 Web 应用程序。
应用程序在浏览器中正常启动,但在文本框中输入一些值并单击搜索按钮后出现错误
“给定的键不在字典中”。
这只发生在 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