"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;
}
}
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()
"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:
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.
Exception Details: System.InvalidOperationException: The request context property on the request must be null or match ApiController.RequestContext.
Stack Trace:
Did you manage to find fix for this issue?
is working on a reply...