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

No applicable method 'Contains' exists in type 'String'

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

异常详细信息: Umbraco.Core.Dynamics.ParseException: No applicable method 'Contains' exists in type 'String'

源错误:

行 8:      Int32.TryParse(_page, out page);
行 9:      var home = CurrentPage.Site();
行 10:     var List = home.Descendants()
行 11: 		.Where("Name.Contains(@0) || Content.Contains(@0)", qstr)
行 12: 		.Where("Visible").OrderBy("UpdateDate desc");

源文件: d:\Umbraco CMS\Views\SearchResult.cshtml    行: 10

堆栈跟踪:

[ParseException: No applicable method 'Contains' exists in type 'String']
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseMemberAccess(Type type, Expression instance) +4932
   Umbraco.Web.Dynamics.ExpressionParser`1.ParsePrimary() +64
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseUnary() +114
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseMultiplicative() +62
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseAdditive() +68
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseComparison() +60
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseLogicalAnd() +60
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseLogicalOr() +60
   Umbraco.Web.Dynamics.ExpressionParser`1.ParseExpression() +33
   Umbraco.Web.Dynamics.ExpressionParser`1.Parse(Type resultType) +36
   Umbraco.Web.Dynamics.DynamicExpression.ParseLambda(ParameterExpression[] parameters, Type resultType, String expression, Boolean convertDynamicNullToBooleanFalse, Object[] values) +113
   Umbraco.Web.Dynamics.DynamicQueryable.Where(IQueryable source, String predicate, Object[] values) +142
   Umbraco.Web.Dynamics.DynamicQueryable.Where(IQueryable`1 source, String predicate, Object[] values) +73
   Umbraco.Web.Models.DynamicPublishedContentList.TryInvokeMember(InvokeMemberBinder binder, Object[] args, Object& result) +1704
   CallSite.Target(Closure , CallSite , Object , String , String ) +278
   ASP._Page_Views_SearchResult_cshtml.Execute() in d:\Umbraco CMS\Views\SearchResult.cshtml:10
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +126
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +110
   Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) +140
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +109
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +890
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +97
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +241
   System.Web.Mvc.Controller.<BeginExecuteCore>b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +19
   System.Web.Mvc.MvcHandler.<BeginProcessRequest>b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +51
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +111
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +606
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +288


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.0.30319.33440

w88优德体育