最佳答案
我有一个控制器动作,可以在本地和生产中的Firefox和本地IE上正常工作,但不能在生产中的IE上正常工作。这是我的控制器动作:
public ActionResult MNPurchase()
{
CalculationViewModel calculationViewModel = (CalculationViewModel)TempData["calculationViewModel"];
decimal OP = landTitleUnitOfWork.Sales.Find()
.Where(x => x.Min >= calculationViewModel.SalesPrice)
.FirstOrDefault()
.OP;
decimal MP = landTitleUnitOfWork.Sales.Find()
.Where(x => x.Min >= calculationViewModel.MortgageAmount)
.FirstOrDefault()
.MP;
calculationViewModel.LoanAmount = (OP + 100) - MP;
calculationViewModel.LendersTitleInsurance = (calculationViewModel.LoanAmount + 850);
return View(calculationViewModel);
}
下面是我在IE中得到的堆栈跟踪:
< p >错误。
处理请求时发生错误。
非静态方法需要一个目标。在
System.Reflection.RuntimeMethodInfo。CheckConsistency(对象目标)at
System.Reflection.RuntimeMethodInfo。InvokeArgumentsCheck(对象obj, BindingFlags
invokeAttr, Binder绑定器,对象[]参数,CultureInfo文化)在
System.Reflection.RuntimeMethodInfo。调用对象obj, BindingFlags, invokeAttr, Binder
binder,对象[]参数,CultureInfo文化)在
System.Reflection.RuntimePropertyInfo。GetValue(Object obj, Object[] index
System.Data.Objects.ELinq.QueryParameterExpression。TryGetFieldOrPropertyValue(MemberExpression me,对象实例,对象&memberValue)
System.Data.Objects.ELinq.QueryParameterExpression。TryEvaluatePath(表达式表达式,常量表达式&constantExpression)
System.Data.Objects.ELinq.QueryParameterExpression。EvaluateParameter (Object[]参数)
在System.Data.Objects.ELinq.ELinqQueryState。GetExecutionPlan (forMergeOption Nullable <代码> 1)
在System.Data.Objects.ObjectQuery > < /代码1。GetResults(Nullable1 forMergeOption) at
System.Data.Objects.ObjectQuery < /代码> 1. system.collections.generic.ienumerable.getenumerator ()
在System.Linq.Enumerable。FirstOrDefault[TSource](IEnumerable1 source
System.Linq.Queryable。FirstOrDefault[TSource](IQueryable
1 source) at
landtitle . controllers . homeconcontroller . mnrefi () at lambda_method(闭包,ControllerBase,
Object[]) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext . execute
controllerContext, dicictionary 2参数)在
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod (ControllerContext
controllerContext, ActionDescriptor ActionDescriptor, IDictionary
2个参数)在
castle . agents . invoctions . controlleractioninvoker_invokeactionmethod . invokemethodontarget (
Glimpse.Mvc3.Interceptor.InvokeActionMethodInterceptor。拦截(IInvocation调用)在castle . dynamicproxy . abstractinvoke . proceed()在
Castle.Proxies.AsyncControllerActionInvokerProxy。InvokeActionMethod(ControllerContext ControllerContext, ActionDescriptor ActionDescriptor, IDictionary ' ' 2个参数)at
System.Web.Mvc.Async.AsyncControllerActionInvoker灵活;> c__DisplayClass37灵活;> c__DisplayClass39.b__33 ()
System.Web.Mvc.Async.AsyncControllerActionInvoker灵活;> c__DisplayClass4f.b__49 ()
System.Web.Mvc.Async.AsyncControllerActionInvoker灵活;> c__DisplayClass37。b__36(IAsyncResult asyncResult) at
System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25.<>c__DisplayClass2a.b__20() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass25. >c__DisplayClass25.<b__22 (IAsyncResult asyncResult) < / p >