Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel 44 posts 187 karma points
    May 05, 2015 @ 15:54
    Daniel
    0

    "Failed to retrieve data for application tree content" in Umbraco backoffice in combined MVC and webforms environment

    I run a site on Umbraco 7.1.3 and a SQL server database, both in Azure platform services.

    The site has been functionationg smoothly running on webforms (upgraded from umbraco 4). Now I have added API functionality, so the environment is mixed between webforms and MVC. I got the API to work, but at the same time the backoffice stopped serving content and gives the error message "Failed to retrieve data for application tree content".

    I'm guessing the routing is screwed up in the mixed environment. Anyone here that have experience in mixing webforms and MVC in Umbraco or have seen this error message?

    My API controller looks like this:

    namespace Externweb.Controllers
    {
        [PluginController("News")]
        public class NewsController : UmbracoApiController
        {
            /// <summary>
            /// Get top 20 member news for all rings
            /// </summary>
            /// <returns>list of news in json</returns>
            public List<NewsModel> GetMemberNews()
            {
                var newsList = new List<NewsModel>();
    
                foreach (var node in Umbraco.Content(1101).Descendants(3).Where("localMembers == true").OrderBy("UpdateDate desc").Take(20))
                {
                    var news = ReadNewsNode(node);
    
                    newsList.Add(news);
                }
    
                return newsList;
            }
    }
  • Daniel 44 posts 187 karma points
    May 06, 2015 @ 14:26
    Daniel
    0

    More information: When running on a local IIS I get this error after logging in on the back office

    Failed to retrieve data for application tree content


    The request context property on the request must be null or match ApiController.RequestContext.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: System.InvalidOperationException: The request context property on the request must be null or match ApiController.RequestContext. 

    Stack Trace: 

    vid System.Web.Http.ApiController.set_Request(HttpRequestMessage value)
       vid Umbraco.Web.Trees.ApplicationTreeExtensions.<TryGetRootNodeFromControllerTree>d__4.MoveNext()
    --- Slut på stackspårningen från föregående plats där ett undantag utlöstes ---
       vid System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       vid System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       vid System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       vid Umbraco.Web.Trees.ApplicationTreeController.<GetRootForSingleAppTree>d__17.MoveNext()
    --- Slut på stackspårningen från föregående plats där ett undantag utlöstes ---
       vid System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       vid System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
       vid System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
       vid Umbraco.Web.Trees.ApplicationTreeController.<GetApplicationTrees>d__4.MoveNext()
    
  • saqib 1 post 71 karma points
    May 19, 2020 @ 14:26
    saqib
    0

    Did you manage to find fix for this issue?

Please Sign in or register to post replies

Write your reply to:

Draft