dotnetnuke2sxcdnn9

2sxc v14 to v16 Upgrade Issue: "Error trying to run ZoneIdOfApp(-100) - probably something wrong with the appId"


I'm trying to upgrade from 2sxc v.14.11.00 to 2sxc 16.07.00 on DNN Evoq Basic. After performing the upgrade on a test version of my site, the majority of my custom apps were upgraded successfully, but existing instances of one app (the most recently built one) causes the DNN pages it resides on to break entirely. In the DNN admin logs, I get the following error message:

AbsoluteURL:/Default.aspx

DefaultDataProvider:DotNetNuke.Data.SqlDataProvider, DotNetNuke

ExceptionGUID:5ca78c40-c1bd-47dc-8ee9-fa25cea13519

AssemblyVersion:9.11.0

PortalId:0

UserId:-1

TabId:840

UserAgent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36

ExceptionHash:cHcp53K7qlaX48ozZlBrNSATb7A=

Message:Error trying to run ZoneIdOfApp(-100) - probably something wrong with the appId

StackTrace:

InnerMessage:Error trying to run ZoneIdOfApp(-100) - probably something wrong with the appId

InnerStackTrace:

   at ToSic.Eav.Caching.AppsCacheBase.ZoneIdOfApp(Int32 appId, IAppLoaderTools tools) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Caching\Apps\AppsCacheBase.cs:line 192
   at ToSic.Eav.Apps.AppStates.IdentityOfApp(Int32 appId) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Apps\AppStates.cs:line 35
   at ToSic.Eav.Persistence.Efc.Efc11Loader.LoadBasicAppState(Int32 appId) in C:\Projects\2sxc\eav-server\ToSic.Eav.Persistence.Efc\Efc11Loader_App.cs:line 35
   at ToSic.Eav.Persistence.Efc.Efc11Loader.AppState(Int32 appId, Boolean ensureInitialized) in C:\Projects\2sxc\eav-server\ToSic.Eav.Persistence.Efc\Efc11Loader_App.cs:line 98
   at ToSic.Eav.Caching.AppsCacheBase.GetOrBuild(IAppLoaderTools tools, IAppIdentity appIdentity, String primaryLanguage) in C:\Projects\2sxc\eav-server\ToSic.Eav.Core\Caching\Apps\AppsCacheBase.cs:line 139
   at ToSic.Lib.Helpers.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Helpers\GetOnce.cs:line 37
   at ToSic.Sxc.Web.LightSpeed.LightSpeed.ExistingGenerator() in C:\Projects\2sxc\2sxc\Src\Sxc\ToSic.Sxc\Web\LightSpeed\LightSpeed.cs:line 182
   at ToSic.Lib.Helpers.GetOnce`1.Get(Func`1 generator) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Helpers\GetOnce.cs:line 37
   at ToSic.Sxc.Dnn.View.<>c__DisplayClass16_0.<Page_PreRender>b__1() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 0
   at ToSic.Lib.Logging.LogCallBaseExtensions.DoInTimer(ILogCall logCall, Action action) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Logging\LogCall\LogCallBaseExtensions.cs:line 15
   at ToSic.Sxc.Dnn.View.<Page_PreRender>b__16_0() in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 116
   at ToSic.Lib.Logging.ILog_Actions.Do(ILog log, String parameters, Action action, Boolean timer, Boolean enabled, String message, String cPath, String cName, Int32 cLine) in C:\Projects\2sxc\eav-server\ToSic.Lib.Core\Logging\Log\ILog_Actions.cs:line 64
   at ToSic.Sxc.Dnn.View.Page_PreRender(Object sender, EventArgs e) in C:\Projects\2sxc\2sxc\Src\Dnn\ToSic.Sxc.Dnn\View.ascx.cs:line 113
   at System.Web.UI.Control.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

After deleting and re-adding the app to a page, the issue goes away. However, I have many instances of this app on my Production site and want to avoid fixing every instance of this issue manually. Is there a way I can ensure this issue doesn't occur when upgrading in Production?


Solution

  • If this doesn't happen all the time, main first thing to try is rebooting the app pool; in DNN that is Settings/Servers, Restart Application (button at the top). Make sure to wait until its finished (2 to 3 page refreshes, 5 to 20 seconds). Then reload the page and see if the problem is happening anywhere.