Losing Globals objects on NavigateTo ForceLoad

I'm currently using v2.86.1 of Blazor Studio. So I load my Globals with a number of system wide objects in the main layout so I can use them in a number of subsequent forms throughout the system. This was working flawlessly on older versions. With this version, if I do a ForceLoad on the NavigateTo, the values stored in Globals is being reset to null. Looking at the changelog, it looks like this was an issue addressed in version 2.67.0 and I'm wondering if the issue has come back. This is a pretty urgent issue for me as it affects the function of my entire application as I rely heavily on using Globals.

Hey @kgordon,

There is no such issue and this cannot be addressed. When you navigate with force to reload it's the same like refreshing the browser - the application is reloaded completely from scratch.

Do this please, take a look at version 2.66.10. This was the version I was using for the longest time because I found it to be a very stable version. With this version, I indeed was doing a force reload on the NavigateTo call within the system and the Globals were not being lost.

In the meantime, I'll look into why I'm doing a force reload, there was a reason that I'll have to look back at my notes as to why.

One additional note is the .Net version for this application is 3.1 Not sure if that makes any difference or not.

The .NET version doesn't matter, force reload will reload the entire application - this is not something related to Radzen at all.

Unfortunately the behavior has definitely changed, perhaps its a .Net issue but it's a real problem for me. Right now I have both the older version running and the latest version and the older version is running fine with the Globals still being in memory regardless of a force reload or not, while the latest version fails. I'm going to put up a separate post on why I'm doing the forcereload and perhaps there's a better way for me to handle that.

You can compare the generated code between both versions if you believe there is a change. As far as we are concerned force reloading an application has always caused a new session to be created and in turn global variables should be initialized again.

I was going to leave this alone because I thought I had a workaround, but honestly this is creating all kinds of havoc with my application.

So I just want to make sure that we're talking about the same thing.

I am saying that when since I've updated to the latest version of Radzen and the .NET updates that took place as well the call below now loses all objects stored in Globals

UriHelper.NavigateTo($"edit-claim/{claim.ClaimID.ToBase64()}", true);

And you are telling me that by setting forceload=true in the navigateTo function, that the entire application is reset and all session variables are lost? And that's the proper behaviour for a Blazor application?

Like I said, this is causing all kinds of havoc with my application. I'm actually going to roll back my version of Radzen back to 2.66.10 until I can figure out another way to handle this.

Yes, reloading the browser resets the application. This however should cause reinitialization of all global variables. We don't know what exactly you are doing though.

You can then compare the difference in the generated code. I don't think there will be much difference though as we haven't touched the implementation of global variables in awhile.