我有一个控制器操作,该操作在Firefox本地和生产环境中以及本地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中获得的堆栈跟踪:
错误。处理您的请求时发生错误。System.Reflection.TargetException:非静态方法需要一个目标。在System.Reflection.RuntimeMethodInfo.CheckConsistency(Object target)在System.Reflection.RuntimeMethodInfo.InvokeArgumentsCheck(Object obj,BindingFlags invokeAttr,活页夹活页夹,Object []参数,CultureInfo文化)在System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr,活页夹活页夹,Object []参数,CultureInfo文化),位于System.Reflection.RuntimePropertyInfo.GetValue(Object obj,Object []索引),位于System.Data.Objects.ELinq.QueryParameterExpression.TryGetFieldOrPropertyValue(MemberExpression我,对象实例, System.Data.Objects.ELinq.QueryParameterExpression.TryEvaluatePath(Expression expression,1 forMergeOption)
at System.Data.Objects.ObjectQuery1.GetResults(可空1 forMergeOption) at
System.Data.Objects.ObjectQuery1.System.Collections.Generic.IEnumerable.GetEnumerator()在System.Linq.Enumerable.FirstOrDefault [TSource](IEnumerable的1 source) at
System.Linq.Queryable.FirstOrDefault[TSource](IQueryable1源)在LandTitle.Controllers.HomeController.MNRefi()在lambda_method(封闭,ControllerBase ,Object []),位于System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary2 parameters) at
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext
潇潇雨雨
蓝山帝景