Skip to content
This repository was archived by the owner on Dec 26, 2025. It is now read-only.
This repository was archived by the owner on Dec 26, 2025. It is now read-only.

[Bug] Session Storage Limit #47

Description

@JackRFoulkes

Describe the bug
Attempting to retrieve a list of stored objects from session storage causes the following error:
image

To Reproduce
Steps to reproduce the behavior:

  1. Create two new classes (these have been generated for me from EF Core). Here are the definitions:
    public partial class IISDashboardUserSetting
    {
        public string UserSettingId { get; set; }
        public string UserId { get; set; }
        public string SettingId { get; set; }
        public string Value { get; set; }
        public virtual IISDashboardSetting Setting { get; set; }
    }
    public partial class IISDashboardSetting
    {
        public IISDashboardSetting()
        {
            IISDashboardUserSettings = new HashSet<IISDashboardUserSetting>();
        }

        public string SettingId { get; set; }
        public string Name { get; set; }
        public string Description { get; set; }

        [JsonIgnore]
        public virtual ICollection<IISDashboardUserSetting> IISDashboardUserSettings { get; set; }
    }
  1. From the database a populated a list of IISDashboardUserSettings with 113 items:
        public List<IISDashboardUserSetting> GetUserSettingsById(string userId)
        {
            using (var eQuipDBContext = eQuipContextFactory.CreateDbContext())
            {
                var userSettings = eQuipDBContext.IISDashboardUserSettings
                    .Include(s => s.Setting)
                    .Where(u => u.UserId == userId).ToList();

                return userSettings;
            }
        }
  1. Store the list in session storage:
            if (modelUserSettings != null || modelUserSettings.Count > 0)
            {
                //We have all the settings...
                await SessionStorageService.SetItemAsync("settings", modelUserSettings);
                StateHasChanged();
            }
  1. Attempt to retrieve the stored list:

image
image

        public async Task<List<IISDashboardUserSetting>> FetchUserSettingsFromStorage()
        {
            return await SessionStorageService.GetItemAsync<List<IISDashboardUserSetting>>("settings");
        }

Expected behavior
Expect to retrieve the list successfully for use in the application.

Screenshots
See above steps.

Hosting Model (is this issue happening with a certain hosting model?):

  • Blazor Server

Additional context
I removed 20 items and tested the same steps and the problem went away.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions