I have a solution that works in Episerver 10 but it doesnt work in Episerver 7. We have a customer who wants his solution in Episerver 7.
I have a controller with the name DigitalanslagstavlaPageController. This controller has two action. Index och GetDocument. Index list information in the html view. GetDocument read a document from a webservice.
Index list information in the html view. GetDocument read a document from a webservice.
This work in Episerver 10, but not in Episerver 7.
Server Error ‘/’ Application
Content with id 517 was not found
*
*
I think it is a routing problem. Can anyone give me tips on how to solve the problem
{
public ActionResult Index(DigitalanslagstavlaPage currentPage)
{
/* CODE THAT DO STUFF */
return View(currentPage);
}
public ActionResult GetDocument(DigitalanslagstavlaPage currentPage, int? Id)
{
/* CODE THAT DO STUFF */
return View(currentPage);
}
}
My MVC routing is
public class EPiServerApplication : EPiServer.Global
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
}
{
base.RegisterRoutes(routes);
"Default",
"{controller}/{action}/{id}",
defaults: new { controller = "DigitalanslagstavlaPage", action = "Index", id = UrlParameter.Optional });
}
}
EPiServer.DataAccess.ContentDB.ThrowNotFoundException(ContentReference contentLink) +135
EPiServer.DataAccess.ContentLoadDB.LoadContentInternal(ContentReference contentLink, Int32 languageBranchId, DbDataReader reader) +306
EPiServer.DataAccess.<>c__DisplayClass1.
EPiServer.Data.Providers.<>c__DisplayClass1`1.
EPiServer.Data.Providers.SqlDeadlockRetryPolicy.Execute(Boolean isInTransaction, Func`1 method) +142
EPiServer.Data.Providers.SqlDatabaseHandler.Execute(Func`1 action) +303
EPiServer.DataAccess.ContentLoadDB.Load(ContentReference contentLink, Int32 languageBranchID) +286
EPiServer.DataAbstraction.ContentStore.Load(ContentReference contentLink, Int32 languageBranchID) +67
EPiServer.DefaultContentProvider.LoadContent(ContentReference contentLink, ILanguageSelector languageSelector) +562
EPiServer.Core.<>c__DisplayClassf.
EPiServer.Core.OptimisticCache`1.Read(String cacheKey, ReadAndCacheObject`1 readAndCacheObject) +794
EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector) +1088
EPiServer.Core.ContentProvider.Load(ContentReference contentLink, ILanguageSelector selector) +75
EPiServer.DataFactory.Get(ContentReference contentLink, ILanguageSelector languageSelector) +395
EPiServer.DataFactory.Get(ContentReference contentLink) +168
EPiServer.Web.Mvc.ExistingActionRouteConstraint.Match(HttpContextBase httpContext, Route route, String parameterName, RouteValueDictionary values, RouteDirection routeDirection) +265
EPiServer.Web.Routing.ContentRoute.MatchConstraints(SegmentContext segmentContext, HttpContextBase context) +650
EPiServer.Web.Routing.ContentRoute.GetRouteData(HttpContextBase httpContext) +670
System.Web.Routing.RouteCollection.GetRouteData(HttpContextBase httpContext) +235
EPiServer.Web.Routing.RouteCollectionExtensions.HandleRouteData(RouteCollection routes, HttpContextBase context) +68
EPiServer.Global.DefaultDocumentHandling(Object sender, EventArgs e) +215
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69