InvalidOperationException after upgrading to CSLA 8 prerelease 24010305 #3647
Replies: 1 comment 9 replies
-
The exception appears to be coming from the The What I get from the exception is that the id manager is attempting to append the cookie to the request object, and the request object is set to read-only by that time. I think the solution is for your initial app landing page to inject an It might be possible to do this in the The one trick on the landing page (at least if it is a server-static page) is that you can't interact with the data portal or the local/client context objects on that page - this is because the cookie isn't actually written to the browser until the page has finished rendering. You can look at the BlazorExample project to see how this is done. I am thinking though, that perhaps the use of the state management should be opt-in. It is opt-in on wasm, but not on the server, and maybe it should be opt-in on the server too. If someone doesn't use local/client context in their app, there should be no need to have this feature at all. |
Beta Was this translation helpful? Give feedback.
-
@rockfordlhotka I have updated to the latest CSLA 8 prerelease, and am running into an issue that I can't figure out. Outside of updating the Nuget packages to prerelease 24010305, I also made the following change to program.cs from this:
to this:
When I run the application, I'm prompted to my Identity Server and can log in, but when I am redirected back to my Blazor Server app I end up with the following exception:
In wondering if the use of the cache had anything to do with the issue, I also removed that from the DataPortal options as well, but still ended up with the same issue.
I haven't upgraded to .NET 8 yet, and am running on .NET 7. Is there some other option that I need change in order to get this working in this CSLA version?
Beta Was this translation helpful? Give feedback.
All reactions