具有相同密钥的项目已添加到表单httpPost MVC 4上

问题描述

在MVC 4中发布表单时,我在Global.asax中遇到此错误,并且我正在努力寻找导致此问题的原因。任何帮助将不胜感激

An item with the same key has already been added.

System.ThrowHelper.ThrowArgumentException(ExceptionResource资源):16 System.Collections.Generic.Dictionary 2.Insert(TKey key,TValue value,Boolean add) System.Collections.Generic.CollectionExtensions.ToDictionaryFast[TKey,TValue](TValue[] array,Func 2 keySelector,IEqualityComparer 1 comparer):36 System.Web.Mvc.ModelBindingContext.get_PropertyMetadata():45 System.Web.Mvc.DefaultModelBinder.BindProperty(ControllerContext controllerContext,ModelBindingContext bindingContext,PropertyDescriptor propertyDescriptor):33 System.Web.Mvc.DefaultModelBinder.BindProperties(ControllerContext controllerContext,ModelBindingContext bindingContext):46 System.Web.Mvc.DefaultModelBinder.BindComplexElementalModel(ControllerContext controllerContext,Object model):28 System.Web.Mvc.DefaultModelBinder.BindComplexModel(ControllerContext controllerContext,ModelBindingContext bindingContext):596 System.Web.Mvc.ControllerActionInvoker.GetParameterValue(ControllerContext controllerContext,ParameterDescriptor parameterDescriptor):134 System.Web.Mvc.ControllerActionInvoker.GetParameterValues(ControllerContext controllerContext,ActionDescriptor actionDescriptor):26 System.Web.Mvc.Async.AsyncControllerActionInvoker+<>c__displayClass3_1.<BeginInvokeAction>b__0(AsyncCallback asyncCallback,Object asyncState):645 System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase 1.Begin(AsyncCallback回调,对象状态,Int32超时):38 System.Web.Mvc.Async.AsyncControllerActionInvoker.BeginInvokeAction(ControllerContext controllerContext,字符串actionName,AsyncCallback回调,对象状态):198 System.Web.Mvc.Controller + c.b__152_0(AsyncCallback asyncCallback,对象asyncState,ExecuteCoreState innerState) System.Web.Mvc.Async.AsyncResultWrapper + WrappedAsyncVoid 1.CallBeginDelegate(AsyncCallback callback,Object callbackState) System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncResultBase 1.Begin(AsyncCallback回调,对象状态,Int32超时):38 System.Web.Mvc.Controller.BeginExecuteCore(AsyncCallback回调,对象状态):229 System.Web.Mvc.Async.AsyncResultWrapper + WrappedAsyncResultBase 1.Begin(AsyncCallback callback,Object state,Int32 timeout):38 System.Web.Mvc.Controller.BeginExecute(RequestContext requestContext,AsyncCallback callback,Object state):156 System.Web.Mvc.MvcHandler+<>c.<BeginProcessRequest>b__20_0(AsyncCallback asyncCallback,Object asyncState,ProcessRequestState innerState):30 System.Web.Mvc.Async.AsyncResultWrapper+WrappedAsyncVoid 1.CallBeginDelegate(AsyncCallback回调,对象callbackState) System.Web.Mvc.Async.AsyncResultWrapper + WrappedAsyncResultBase`1.Begin(AsyncCallback回调,对象状态,Int32超时):38 System.Web.Mvc.MvcHandler.BeginProcessRequest(HttpContextBase httpContext,AsyncCallback回调,对象状态):167 System.Web.HttpApplication + CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute():261 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep步骤):100 System.Web.HttpApplication.ExecuteStep(IExecutionStep步骤,布尔值和已完成同步):55

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)