Hi,
This is a problem of Blazorise.
You can try :
context.Services.AddBlazorise(options =>
{
options.Immediate = true;
});
I will check it
Hi,
Will it work if you try this? https://community.abp.io/posts/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n
Hi,
Yes, it's a problem. We will enhance the ABP suite:
You can consider:
protected virtual async Task OnDateMaxChangedAsync(DateTime? dateMax)
{
Filter.DateMax = dateMax == null ? null : dateMax.Value.Date.AddDays(1).AddSeconds(-1);
await SearchAsync();
}
Hi,
The problem has been solved. I'm closing this.
Hi,
I could not reproduce the problem, could you provide the full steps to reproduce? thanks.
public class MyEventData : IMultiTenant
{
public MyEventData(string name, Guid? tenantId)
{
Name = name;
TenantId = tenantId;
}
public string Name { get; set; }
public Guid? TenantId { get; }
}
public class MyEventHandler : ILocalEventHandler<MyEventData>, ITransientDependency
{
private readonly ILogger<MyEventHandler> _logger;
public MyEventHandler(ILogger<MyEventHandler> logger)
{
_logger = logger;
}
public Task HandleEventAsync(MyEventData eventData)
{
_logger.LogInformation("MyEventData: {0}", eventData.Name);
return Task.CompletedTask;
}
}
public class Book : FullAuditedAggregateRoot<Guid>, IMultiTenant
{
public Guid? TenantId { get; }
public string Name { get; set; }
public Book(Guid id, string name, Guid? tenantId)
{
Id = id;
Name = name;
TenantId = tenantId;
AddLocalEvent(new MyEventData(name, tenantId));
}
}
public class TestAppService : Myapp4AppService
{
private readonly IRepository<Book, Guid> _bookRepository;
public TestAppService(IRepository<Book, Guid> bookRepository)
{
_bookRepository = bookRepository;
}
public async Task Test(Guid tenantId)
{
using (CurrentTenant.Change(tenantId))
{
var book = new Book(GuidGenerator.Create(), "test", tenantId);
var book2 = new Book(GuidGenerator.Create(), "test2", tenantId);
await _bookRepository.InsertManyAsync(new[] { book, book2 });
}
}
}
I will check it
I only want to remove this option when I use the specific templates, for the other templates like emailing, i think i need this. I don't think there is an option for that right now?
You can replace the DatabaseTemplateContentContributor
with your own. for example:
[ExposeServices(typeof(MyDatabaseTemplateContentContributor), typeof(ITemplateContentContributor))]
public class MyDatabaseTemplateContentContributor : DatabaseTemplateContentContributor
{
public override async Task<string> GetOrNullAsync(TemplateContentContributorContext context)
{
if(context.TemplateDefinition.Name == "MyTemplate.....")
{
return null; // skip
}
return await Cache.GetOrAddAsync(
new TemplateContentCacheKey(context.TemplateDefinition.Name, context.Culture),
async () => await GetTemplateContentFromDbOrNullAsync(context),
() => new DistributedCacheEntryOptions
{
SlidingExpiration = Options.MinimumCacheDuration
}
);
}
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpTextTemplatingOptions>(options =>
{
options.ContentContributors.RemoveAll(x => x == typeof(DatabaseTemplateContentContributor));
});
}
To overcome the problem for now i am adding prefix to the name of the templates that I want to exclude, and added another template content contributor
That's fine.
here you can see that the code will check the db and since it is a static store it will return null. And this has been tried with localization "en" and couldn't find it. Next try will be with null, and in that case the same thing will happen from dbcontributor, if you have en-En culture it will do 3 times
Because the template system supports multiple languages, if the current language template does not exist, it will try to regress to the default language. this is by design.
You can override the default implementation if you want.
Is there any benchmark that has been done with abp template for stress testing? I don't want to deploy the app and having surprises. Since it is gonna be iot devices that will connect to server it can increase the load very much. I need to find the sweet spot for 1 instance so i can do the decisions for sharding and clusters. I am not expecting more than 10 000 devices inside the system. So i was expecting to handle that much load with 1 instance.
No, we didn't do such a test. I think you must know the 80-20 rule, you can optimize for specific templates, such as using memory cache, which will greatly improve performance.
Hi,
We will fix it in the next patch version.