I was able to resolve the issue by upating the Helm chart angular-configmap.yaml.
Please update the Helm charts regularly when you change things as these things take a very long time and effort to figure this out.
I was able to set up the Language microsrvices and can access Language men.
However I am unable to see the impersonation menu , Its the Admin Role and I have checked all permission is applied to the role including impersonation.
So where should I start looking into to troubleshoot?
I created a solution with Dynamic Localization OFF that means we create dwithout Language micro service.
We are able to see all menus except impersonation for Tenant user or User and Language.
Earlier Language used to part of the solution without the need of additional micro service.
I am using AutoAPI Controller and trying to implement versioning in Module. No changes in Host/micrsosrvice
The issue I am facing now is I created 2 App Service with the same name however different namespace.
namespace xxxx.Payroll.Project.v1
{
//[Authorize(ProjectPermissions.Projects.Default)]
public class xxAppService : ApplicationService, IProjectV1AppService
namespace xxxx.Payroll.Project.v2
{
//[Authorize(ProjectPermissions.Projects.Default)]
public class xxAppService : ApplicationService, IProjectV2AppService
{
My Preconfigure in.httpapi project looks like this :
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IMvcBuilder>(mvcBuilder =>
{
mvcBuilder.AddApplicationPartIfNotExists(typeof(ProjectHttpApiModule).Assembly);
});
PreConfigure<AbpAspNetCoreMvcOptions>(options =>
{
//2.0 Version
options.ConventionalControllers.Create(typeof(ProjectApplicationModule).Assembly, opts =>
{
opts.TypePredicate = t => t.Namespace == typeof(v2.xxAppService).Namespace;
opts.ApiVersions.Add(new ApiVersion(2, 0));
});
//1.0 Compatibility version
options.ConventionalControllers.Create(typeof(ProjectApplicationModule).Assembly, opts =>
{
opts.TypePredicate = t => t.Namespace == typeof(v1.xxAppService ).Namespace;
opts.ApiVersions.Add(new ApiVersion(1, 0));
});
});
}
I get the below error duplicate key in th below code :
public void Configure(SwaggerGenOptions options)
{
// add a swagger document for each discovered API version
// note: you might choose to skip or document deprecated API versions differently
foreach (var description in provider.ApiVersionDescriptions)
{
options.SwaggerDoc(description.GroupName, CreateInfoForApiVersion(description));
}
}
If i use different Class name everything works fine.
My understanding of the versioning was in Swagger we will be able to see the same endpoints but with an extra property as Version. Am I missing something here ?
I have scouted all articles in versioning from support but couldn't find any answers
I am building a module and using that module in my microservices.
This module is calling a third party API which required an URL, username and password.
I am able to access the appseetings.json values in modules configured in microservices by this :
context.Services.AddHttpClient("myttpClient", client =>
{
// Set the base address
client.BaseAddress = new Uri(configuration.GetSection("ThirdPartyUrls:xxxx:BaseUrl").Value);
// Set default request headers
client.DefaultRequestHeaders.Add("User-Agent", "ddddd");
client.DefaultRequestHeaders.Accept.Add(
new MediaTypeWithQualityHeaderValue("application/json"));
// Set timeout for requests
client.Timeout = TimeSpan.FromSeconds(180);
client.DefaultRequestHeaders.CacheControl = CacheControlHeaderValue.Parse("no-cache");
})
// Add the custom HTTP message handler
.AddHttpMessageHandler<myttpClientHandler>();
However I don't like this as it's dependent on the Appsettin.json of module to retrieve the value , rather i would like to use options to pass the value to the modules.
I also have a TokenService in the module which is expecting a usernaem and password to go and get the token from the third party.
So the question is where and how should I write in the module so that I can configure the module in the microservice, something like this :
Configure<AbpRabbitMqOptions>(options =>
{
options.Connections.Default.UserName = configuration["RabbitMQ:Connections:Default:UserName"];
options.Connections.Default.Password = configuration["RabbitMQ:Connections:Default:Password"];
options.Connections.Default.HostName = configuration["RabbitMQ:Connections:Default:HostName"];
options.Connections.Default.Port = 5671;
options.Connections.Default.VirtualHost = configuration["RabbitMQ:Connections:Default:VirtualHost"];
});
The gist of the question is how do i write the module so that I can configure that in the microservices.
I configured a Confidential Client and added a secret, When I use this secret in Swagger it gives me a 404 error?
I have selected the correct scope while testing?
Is there anything I am missing
We are building microservices and module as well. All our code is on module, so how to debug the module using visual studio. I can start the Microservice project on its own, however not the module project, so how do i step in to the module code while debugging
We want to share one database for all our microservices, and each of the microservices will have their own tables however the AbpEventBox table is one of the table thats' common across all microservices.
I was referring to this article but couldn't understand a lot. Can you please explain a little bit in details on how to go about it? Please be descriptive as much as possible as I am sure others would also be looking for a similar solution.
Thank You and that was the cause of the issue. There should be a troubleshooting guide for this, the Abp Studio is in Beta and doesn't work at times properly, like migration not getting created. You should put a guide on things to watch out when you create a project for the first time
Yes the database do not exists and when we run any microservice solution it should create the database automatically.
Doesn't this line of code expected to do that :
public override async Task OnPreApplicationInitializationAsync(ApplicationInitializationContext context)
{
using var scope = context.ServiceProvider.CreateScope();
await MigrateDatabase(scope.ServiceProvider);
}
However we used the Abp Studio to run the Migration as we get the below error
0:20:44.265 Information Starting task execution: "Updating the database: IntegrationServices.AdministrationService"20:22:24.503 Information CLI command executed. Command: "dotnet ef database update"
Working directory: "C:\SourceCode\integration-microservices\services\administration\IntegrationServices.AdministrationService"
CommandResult { ExitCode: 1, IsSuccess: False, StartTime: 09/17/2024 20:20:44 -07:00, ExitTime: 09/17/2024 20:22:24 -07:00, RunTime: 00:01:40.2136695 }
20:22:24.505 Information Failed task execution: "Updating the database: IntegrationServices.AdministrationService"
20:22:24.505 Information ERROR: "An error has occured!"
20:22:24.505 Information ERROR DETAILS: "Failed to update database in project IntegrationServices.AdministrationService"
20:22:24.505 Warning Exception of type 'Volo.Abp.Studio.AbpStudioException' was thrown.
20:22:24.507 Warning Code:AbpStudio:EfCoreUpdateDatabaseFailed
20:22:24.507 Warning Details:
20:22:24.507 Warning ---------- Exception Data ----------
ProjectName = IntegrationServices.AdministrationService
<br> Then i went ahead and tried toe apply migration like the below
dotnet ef database update --project IntegrationServices.AdministrationService --context AdministrationServiceDbContext
No migrations were applied. The database is already up to date.
When I went to the database this is what I see , only the migration history table gets created when the code is getting built :
I am very confused how things should work, you mentioned run the migrator, where is the migrator project , it doesn't come by default.
We never had such issues while using MySQL, why the process will be any different and if its different what's the correct process. I am doubting it may be to do with the code template or somehwere in the code, have you tried the project i sent you