Hi,
Tks for your suggestion, It fixes my issue. conn.SearchAsync is very slow.
But if you want to keep using http, you should apply AddSameSiteCookiePolicy to all your websites.
I already applied this one for Web project, and I've just applied for AuthServer project, but still get the error:
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
if (!Convert.ToBoolean(configuration["App:DisablePII"]))
{
Microsoft.IdentityModel.Logging.IdentityModelEventSource.ShowPII = true;
}
if (!Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]))//false in appsettings.json
{
Configure<OpenIddictServerAspNetCoreOptions>(options =>
{
options.DisableTransportSecurityRequirement = true;// Already had from old version
});
}
context.Services.AddSameSiteCookiePolicy(); // just added this line
...
}
And as I said above, everything's still OK before upgrading
No, I am using OpenIdDict, but I already applied that solution and it worked fine before upgrading
Hi,
Changing to https is taking time, is there any way to use http. Everything's still OK before upgrading.
Hi,
Just call RefreshManyAsync above to refresh or other method?
Hi, So that means there is no way to refresh the cache immediately, right?
Hi,
Can I use RefreshManyAsync method of IDistributedCache<PermissionGrantCacheItem> to refresh the cache whenever I change permissions?
I don't understand why RemoveManyAsync not work when deploying on K8s?
Hi,
Removing distributed cache with above method call when deploying on K8s does not affect immediately. The cache is refreshed after 5 minutes (I guess). Is there anything I have to do? How to remove old cache immediately after changing permissions?
Hi,
Thanks for your suggestion. I inject IDistributedCache<PermissionGrantCacheItem> and call it's RemoveManyAsync method => it works perfectly now.
Hi,
It works now. The Id need to be uppercase: .RequirePermissions(menuItem.Id.ToString().ToUpper()), but when I refresh the page, the granted menus are not displayed immediately. I have to manually clear redis cache. So, which is the right method I have to call to refresh the cache when changing permissions?