Hi @Aima Maqsood
I want to know about is there any method or technique available through which we can store our significant variables/maintain the page state in sessions under Blazor Server Pages? We are developing a high level blazor server application which needs to meet the CISCO CSDL Items (security items), where we can't store the data/values in Local storage/session storage even in cookies (except for encrypted JWT Token).
Since you can't store state in Local Storage, Session Storage, or Cookies (except for an encrypted JWT token), your best approach is to use server-side storage. Options include:
- Blob storage
- Key-value storage
- Relational database
- Table storage
You can create a table to store state per user and store the state of replication actions per user.
After data is saved, the user's state is retained and available in any new circuit. For more information on Azure data storage options, see the following:
More detail information, see ASP.NET Core Blazor state management#Server-side storage.
Besides, you could also consider using Azure Redis Cache, refer to:
Quickstart: Use Azure Redis with an ASP.NET web app
Distributed caching in ASP.NET Core
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion