Hello, We are planning to move our application from zero to abp.
Us company have multiple saas projects
To use apb effectively, i try to create empty moduler projects & architectural
My main purpose, if we want us projects have to work modular monolith(unified on one host) or seprated(like mikroservice at firstly them will be like macroservice)
For authentication & authorization if customer use all products, projects have to use one single sign on server, or if we want we have to seprate auth for each project
For each project i created 2 solution, firstly with application template Company.ProjectName (host for main module) and with module template Company.ProjectName.MainModule (it could be contain more small services/modules in feature)
If we want unified them, i will create one host solution and will referance each ProjectName.MainModule
My main question is if we use single authentication & authorization server, how will we manage create user & permissions, i guess each project have to user table because each project have different props for users. For example if project a want to create user, are we create it firstly project a and sync to identity or opposite? For permissions management, each project will have too many permissions, should we control them from a single point? can every project manage own permissions? I mean should auth server know all permissions for each project?
Hi, how can i get current user bearer token to call remote api without using dynamic proxy client. Can you provide full example with HttpClient object
I try to get options from IHttpClientProxy but its just have service info. I wish we could get ready to use HttpClient object for make custom call..
I try to implement devexpress DataGrid CustomData option. Its provide to call api with paging,sorting,group by,summary.. options. And it can modify IQuarable object by your input object (await DataSourceLoader.LoadAsync(query, input))
For that you have to create method with special signature (how devex DataGrid like) async Task<LoadResult> GetData(DataSourceLoadOptionsBase options, CancellationToken cancellationToken) But dynamic proxy couldnt serialize DataSourceLoadOptionsBase object why i dont know, already devex have helper method for that options.ConvertToGetRequestUri("http://apiurl")
Hi, I created project with suite microservice template. Everythink worked correct (i started project with tye) Also i have module project. I created them with module template. I added new service to microservice project as document show. After i referenced module to this service. I did as you do in saas service. But when i run any api method that interact with database from swagger its throw error
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Kuys.Module.EmployeeManagement.EntityFrameworkCore.EmployeeManagementDbContext -> ?:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Kuys.Module.EmployeeManagement.EntityFrameworkCore.EmployeeManagementDbContext, Kuys.Module.EmployeeManagement.EntityFrameworkCore, Version=0.1.0.0, Culture=neutral, PublicKeyToken=null]]. ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=5.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure
When i comment below lines its working
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<EmployeeManagementServiceDbContext>(options =>
{
options.ReplaceDbContext<IEmployeeManagementDbContext>();
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
....
}
My module api method using custom repository, this repository try to access dbcontext inside it.
Where i missing or is it could be bug? I guess ReplaceDbContext not work correct??
According to my scenario, I have to sync my users between my modules. But unlike your cmskit module, I should be able to add users through my page in my module project. In other words, the user I add from the module must be synchronous to the identity module (i.e. I should not be dependent on identity module screens).
How should I go about this process? (who should throw an event to whom? Should a user be added directly to the identity module via API call? etc..).
Hello, I try to use devexpress xtrareport with their objectdatasource but i get error "Instances cannot be resolved and nested lifetimes cannot be created from this LifetimeScope as it (or one of its parent scopes) has already been disposed."
This is my objectdatasource class, i bind to report get method
[HighlightedClass]
public class ObjectDataSource : ITransientDependency
{
private readonly IServiceScopeFactory _serviceScopeFactory; // <== HERE DISPOSED = TRUE
public ObjectDataSource( IServiceScopeFactory serviceScopeFactory){
_serviceScopeFactory = serviceScopeFactory;
}
[HighlightedMember]
public async Task<IEnumerable<DataModel>> Get(Guid id)
{
var scope = _serviceScopeFactory.CreateScope(); // _serviceScopeFactory is disposed here
...
return dataModel;
}
}
}
At first I implemented this interface "IWebDocumentViewerReportResolver" to override xtrareport's creating progress (xtrareport contain objectdatasource)
public class WebDocumentViewerReportResolver : IWebDocumentViewerReportResolver
{
ObjectDataSourceInjector DataSourceInjector { get; }
ReportStorageWebExtension ReportStorageWebExtension { get; }
public WebDocumentViewerReportResolver(
ReportStorageWebExtension reportStorageWebExtension,
ObjectDataSourceInjector dataSourceInjector)
{
DataSourceInjector = dataSourceInjector ?? throw new ArgumentNullException(nameof(dataSourceInjector));
ReportStorageWebExtension = reportStorageWebExtension ?? throw new ArgumentNullException(nameof(reportStorageWebExtension));
}
public XtraReport Resolve(string reportEntry)
{
using (MemoryStream ms = new MemoryStream(ReportStorageWebExtension.GetData(reportEntry)))
{
var report = XtraReport.FromStream(ms);
DataSourceInjector.Process(report); // HERE I resolve object datasource services
return report;
}
}
}
Here, i resolved services as devexpress recommend
namespace Kuys.Shared.AspNetCore.DevExp.Reporting.HttpApi
{
public class ObjectDataSourceInjector
{
private readonly IServiceProvider _serviceProvider;
public ObjectDataSourceInjector(IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider ?? throw new ArgumentNullException(nameof(serviceProvider));
}
public void Process(XtraReport report)
{
var dse = new UniqueDataSourceEnumerator();
((IServiceContainer)report).ReplaceService(typeof(IReportProvider), _serviceProvider.GetRequiredService<IReportProvider>());
foreach (var dataSource in dse.EnumerateDataSources(report, true))
{
if (dataSource is ObjectDataSource ods && ods.DataSource is Type dataSourceType)
{
ods.DataSource = _serviceProvider.GetRequiredService(dataSourceType); // <== DISPOSE = FALSE
}
}
}
}
}
Hello,
We try to implement row level auth mechanism. For that firstly we think about global filters. But we had to give up. Because us conditions not static, users will create dynamic conditions like x user for a table just can see y column equal 'xxx'. But global filters adding conditions even not need to current user. We can pass fake value to ignore condition but queries will grow and we need set dynamically without restart app.
Then we decied to override base abp repository methods. Which method would be correct to hack to implement this or do you have any other suggestions?
Hello, I create project with module template from suite. But I need to blazor Server Host project call remote service from api and should use identityserver not unified. Default Its create work unified. I trying to convert it but I stuck. When I click login button its not redriect identityserver project Show message like this
How can I say to suite, create module project but blazor server host should be work like web assembly(not unified)
Can you create module solution like this and send my email? project name is can be "Kuys.Module.EmployeeManagement"
We feed our microservices with modules. We are experiencing unexpected errors as we work this unified way.
Thanks
Hello, our pipelines not working because of yours server not work.