hi
Can you share your project source code?
I will download and check the code.
You can remove the environment code so I can reproduce it on my local.
liming.ma@volosoft.com
Thanks.
190 permission should be pretty quick. I think the issue still has to do with Redis.
You can try to disable the cache in PermissionStore?
using System.Linq;
using System.Threading.Tasks;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Caching;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain.Repositories;
namespace Volo.Abp.PermissionManagement;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPermissionStore), typeof(PermissionStore), typeof(MyPermissionStore))]
public class MyPermissionStore : PermissionStore
{
public MyPermissionStore(
IPermissionGrantRepository permissionGrantRepository,
IDistributedCache<PermissionGrantCacheItem> cache,
IPermissionDefinitionManager permissionDefinitionManager)
: base(permissionGrantRepository, cache, permissionDefinitionManager)
{
}
public async override Task<bool> IsGrantedAsync(string name, string providerName, string providerKey)
{
using (PermissionGrantRepository.DisableTracking())
{
var permissionGrant = await PermissionGrantRepository.FindAsync(name, providerName, providerKey);
return permissionGrant != null;
}
}
public async override Task<MultiplePermissionGrantResult> IsGrantedAsync(string[] names, string providerName, string providerKey)
{
Check.NotNullOrEmpty(names, nameof(names));
var result = new MultiplePermissionGrantResult();
if (names.Length == 1)
{
var name = names.First();
result.Result.Add(name, await IsGrantedAsync(names.First(), providerName, providerKey)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined);
return result;
}
using (PermissionGrantRepository.DisableTracking())
{
var permissionGrants = await PermissionGrantRepository.GetListAsync(names, providerName, providerKey);
foreach (var name in names)
{
result.Result.Add(name,
permissionGrants.Any(x => x.Name == name)
? PermissionGrantResult.Granted
: PermissionGrantResult.Undefined);
}
return result;
}
}
}
I don't have many ideas.
I ran your project, and it works.
https://abp.io/support/questions/9350/Custom-ConnectionStringResolver-Issue#answer-3a1a07c1-789d-d7e0-e1c2-2bab8465974e
You're welcome.
好的, 支持团队会检查 9371 问题。
hi
It will be the same as NET 9, We will test NET 10 RC in August or September. And will upgrade to the official version as soon as possible, then release ABP 10.0.
https://github.com/abpframework/abp/issues/20561
请尝试把这个文件中的端口也一并修改
etc\abp-studio\run-profiles\Default.abprun.json
执行 dotnet run 命令应用程序输出的日志是什么?
改成其他的端口呢? 比如 40000
hi
Can you try to upgrade to >=9.1.1
Or try to add MyAbpEfCoreNavigationHelper to your EF Core project.
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore.ChangeTrackers;
using Volo.Abp.OpenIddict.Tokens;
namespace Pusula.Training.HealthCare.EntityFrameworkCore;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(AbpEfCoreNavigationHelper))]
public class MyAbpEfCoreNavigationHelper : AbpEfCoreNavigationHelper
{
public override void ChangeTracker_Tracked(object? sender, EntityTrackedEventArgs e)
{
if (e.Entry.Entity.GetType() == typeof(OpenIddictToken))
{
return;
}
base.ChangeTracker_Tracked(sender, e);
}
public override void ChangeTracker_StateChanged(object? sender, EntityStateChangedEventArgs e)
{
if (e.Entry.Entity.GetType() == typeof(OpenIddictToken))
{
return;
}
base.ChangeTracker_StateChanged(sender, e);
}
}
hi
I think your email settings can be read correctly, but the value is wrong.
You can check it by override the MailKitSmtpEmailSender
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IMailKitSmtpEmailSender), typeof(MailKitSmtpEmailSender), typeof(MyMailKitSmtpEmailSender))]
public class MyMailKitSmtpEmailSender : MailKitSmtpEmailSender, IMailKitSmtpEmailSender, ITransientDependency
{
public MyMailKitSmtpEmailSender(
ICurrentTenant currentTenant,
ISmtpEmailSenderConfiguration smtpConfiguration,
IBackgroundJobManager backgroundJobManager,
IOptions<AbpMailKitOptions> abpMailKitConfiguration)
: base(currentTenant, smtpConfiguration, backgroundJobManager, abpMailKitConfiguration)
{
}
protected override Task ConfigureClient(SmtpClient client)
{
var host = SmtpConfiguration.GetHostAsync();
var port = SmtpConfiguration.GetPortAsync();
var userName = SmtpConfiguration.GetUserNameAsync();
var password = SmtpConfiguration.GetPasswordAsync();
var domain = SmtpConfiguration.GetDomainAsync();
var enableSsl = SmtpConfiguration.GetEnableSslAsync();
var useDefaultCredentials = SmtpConfiguration.GetUseDefaultCredentialsAsync();
return base.ConfigureClient(client);
}
}
https://support.sendgrid.com/hc/en-us/articles/17894803361819-Troubleshooting-535-Authentication-failed-Error