Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a Partial View (Umbraco v6 MVC) and I have this code:
Line 21: var mySite = Umbraco.TypedContentAtRoot().First(n => Line 22: n.IsVisible() [cut some code] );
This is working on local development but not on a test machine. I removed xmlcache, examine indexes and did a "Republish entire site".
But my site (front end) still thows on the error.
Stack Trace:
[InvalidOperationException: Sequence contains no matching element] System.Linq.Enumerable.First(IEnumerable`1 source, Func`2 predicate) +338 ASP._Page_Views_Partials_Navigation_cshtml.Execute() in g:\myPath\Views\Partials\Navigation.cshtml:21 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196 StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer) +295 System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +147 ASP._Page_Views_Master_cshtml.Execute() in g:\myPath\Views\Master.cshtml:60 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +280 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +125 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +196 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +208 System.Web.WebPages.WebPageBase.PopContext() +199 StackExchange.Profiling.MVCHelpers.WrappedView.Render(ViewContext viewContext, TextWriter writer) +295 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +380 System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +33 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263 System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691 System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__19() +40 System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +53 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20 System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +20 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Has anyone ANY idea what this is or how this could be solved?
Don't bother the "cut some code" was throwing the error.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Umbraco.TypedContentAtRoot() contains no elements
I have a Partial View (Umbraco v6 MVC) and I have this code:
Line 21: var mySite = Umbraco.TypedContentAtRoot().First(n => Line 22: n.IsVisible() [cut some code] );
This is working on local development but not on a test machine. I removed xmlcache, examine indexes and did a "Republish entire site".
But my site (front end) still thows on the error.
Stack Trace:
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272
Has anyone ANY idea what this is or how this could be solved?
Don't bother the "cut some code" was throwing the error.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.