1

错误完整描述:

System.ArgumentException: The parameters dictionary contains a null entry for  
  parameter 'quoteId' of non-nullable type 'System.Int32' for method 
  'System.Web.Mvc.JsonResultGetQuoteSubTotal(Int32, System.String)' 
  in 'NI.Apps.WebSite.OliteBase.Controllers.QuotationController'. 
  An optional parameter must be a reference type, a nullable type,
  or be declared as an optional parameter.
Parameter name: parameters
   at System.Web.Mvc.ActionDescriptor.ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary`2 parameters, MethodInfo methodInfo)
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   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)

我的旧 Web 服务器上从未发生过该错误。旧的 Web 服务器环境:Windows Server 2003(64bit)/IIS 6/.NET 4。在我将环境升级到:Windows Server 2008R2/IIS 7.5/.NET 4 后,总是抛出错误,但并非所有请求都会导致错误。

所以这个问题是配置问题?

谢谢。

4

2 回答 2

0

当从浏览器发送的请求中缺少必需参数时,会出现此错误。检查期望传递给页面的参数值。

于 2014-10-14T08:19:44.020 回答
0

这是 unlikley 配置错误。看起来一些传入的请求缺少quoteId不是可选的参数。如果您对它们播放相同的请求,两台服务器很可能都会显示此行为(除非代码也不同)。

于 2012-10-26T03:51:07.417 回答