“/”应用程序中的服务器错误。

The parameters dictionary contains a null entry for parameter 'type' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult ServiceSearch(System.String, Int32, Int32, Int32, System.String, System.String)' in 'JcTransCompany.Controllers.SearchController'. To make a parameter optional its type should be either a reference type or a Nullable type.
参数名: parameters

说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.ArgumentException: The parameters dictionary contains a null entry for parameter 'type' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult ServiceSearch(System.String, Int32, Int32, Int32, System.String, System.String)' in 'JcTransCompany.Controllers.SearchController'. To make a parameter optional its type should be either a reference type or a Nullable type.
参数名: parameters

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[ArgumentException: The parameters dictionary contains a null entry for parameter 'type' of non-nullable type 'System.Int32' for method 'System.Web.Mvc.ActionResult ServiceSearch(System.String, Int32, Int32, Int32, System.String, System.String)' in 'JcTransCompany.Controllers.SearchController'. To make a parameter optional its type should be either a reference type or a Nullable type.
参数名: parameters]
   System.Web.Mvc.ReflectedActionDescriptor.ExtractParameterFromDictionary(ParameterInfo parameterInfo, IDictionary`2 parameters, MethodInfo methodInfo) +270726
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +110
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +548
   System.Linq.Enumerable.ToArray(IEnumerable`1 source) +108
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +177
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +31
   System.Web.Mvc.<>c__DisplayClassa.<InvokeActionMethodWithFilters>b__7() +85
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +235459
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +235459
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +288
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +235638
   System.Web.Mvc.Controller.ExecuteCore() +174
   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +209
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171


版本信息: Microsoft .NET Framework 版本:2.0.50727.9044; ASP.NET 版本:2.0.50727.9051