我有一个控制器操作,该操作在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,活页夹活页夹,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.ObjectQuery
1.GetResults(可空1 forMergeOption) at System.Data.Objects.ObjectQuery
1.System.Collections.Generic.IEnumerable.GetEnumerator()在System.Linq.Enumerable.FirstOrDefault [TSource](IEnumerable的1 source) at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable
1源)在LandTitle.Controllers.HomeController.MNRefi()在lambda_method(封闭,ControllerBase ,Object []),位于System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2个参数)在Castle.Proxies.Invocations.ControllerActionInvoker_InvokeActionMethod.InvokeMethodOnTarget()在Castle.DynamicProxy.AbstractInvocation.Proceed()在Glimpse.Mvc3.Interceptor.InvokeActionMethodInterceptor.Intercept(IInvocation调用)在Castle.DynamicProxy.AbstractInvocationed() Castle.Proxies.AsyncControllerActionInvokerProxy.InvokeActionMethod(ControllerContext controllerContext,ActionDescriptor actionDescriptor,IDictionary``2个参数)at System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass37。<> c__DisplayClass39.b__33()at System.Web.Mvc.Async System.Web.Mvc.Async.AsyncControllerActionInvoker中的<> c__DisplayClass4f.b__49()。System.Web.Mvc.Async中的<> c__DisplayClass37.b__36(IAsyncResult asyncResult)。AsyncControllerActionInvoker。<> c__DisplayClass25。<> c__DisplayClass2a.b__20()在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass25.b__22(IAsyncResult asyncResult)