Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidOperationException: Cache entry must specify a value for Size when SizeLimit is set. #26

Open
Daeamon opened this issue Aug 10, 2021 · 1 comment

Comments

@Daeamon
Copy link

Daeamon commented Aug 10, 2021

Application: asp.net core 5 web application
Razor Page Crashed

<a class="materials-filter-item @allActive" asp-area="" asp-route-interioreffectid="@Model.interioreffectid" asp-page="/Interiors">
    <localize>All</localize>
    @if (!String.IsNullOrEmpty(allActive))
    {
        <svg data-src="/Content/images/arrow-right-down.svg" fill="transparent"></svg>
    }
</a>

Exception

Microsoft.Extensions.Caching.Memory.MemoryCache.SetEntry(CacheEntry entry)
Microsoft.Extensions.Caching.Memory.CacheEntry.Dispose()
Microsoft.Extensions.Caching.Memory.CacheExtensions.Set<TItem>(IMemoryCache cache, object key, TItem value, MemoryCacheEntryOptions options)
XLocalizer.Common.ExpressMemoryCache.Set<T>(string key, string value)
XLocalizer.XStringLocalizer<TResource>.GetLocalizedString(string name, object[] arguments)
XLocalizer.XStringLocalizer<TResource>.get_Item(string name, object[] arguments)
XLocalizer.XHtmlLocalizer.GetHtmlString(string name, object[] arguments)
XLocalizer.XHtmlLocalizer.get_Item(string name)
XLocalizer.TagHelpers.LocalizationTagHelperBase.GetLocalizedHtmlString(string str)
XLocalizer.TagHelpers.LocalizationTagHelperBase.ProcessAsync(TagHelperContext context, TagHelperOutput output)
XLocalizer.TagHelpers.LocalizeTagHelper.ProcessAsync(TagHelperContext context, TagHelperOutput output)
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner.<RunAsync>g__Awaited|0_0(Task task, TagHelperExecutionContext executionContext, int i, int count)
Pratta.Pages.Pages_Interiors+<>c__DisplayClass15_1+<<ExecuteAsync>b__2>d.MoveNext()
Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext.SetOutputContentAsync()
Pratta.Pages.Pages_Interiors.ExecuteAsync() in Interiors.cshtml
+
                    <a class="materials-filter-item @allActive" asp-area="" asp-route-interioreffectid="@Model.interioreffectid" asp-page="/Interiors">
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, bool invokeViewStarts)
Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, string contentType, Nullable<int> statusCode)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResultFilterAsync>g__Awaited|29_0<TFilter, TFilterAsync>(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResultExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.ResultNext<TFilter, TFilterAsync>(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeResultFilters()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
@LazZiya
Copy link
Owner

LazZiya commented Aug 12, 2021

Hi @Daeamon

Sorry I’m not able to offer a solution now due to some health issues :( may be after two weeks I will be able to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants