Starts in:
1 DAY
22 HRS
49 MIN
16 SEC
Starts in:
1 D
22 H
49 M
16 S

Activities of "castcrewit"

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

  • ABP Framework version: v8.3
  • UI Type: Angular
  • Database System: EF Core (SQL Serve)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

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.

  • ABP Framework version: v8.3
  • UI Type: Angular
  • Database System: EF Core (SQL Server,)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

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

Question
  • ABP Framework version: v8.0
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

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

  • ABP Framework version: v8.1
  • UI Type: Angularr
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

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.

  • ABP Framework version: v8.1
  • UI Type: Angular
  • Database System: EF Core (SQL Server,)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am now using AbpIo for a new project and I am using the Micro Service templates. But this time I am using SQL Server instead of mysql in the past. I used the Abp Studio and created the template and then changed all the connection strings to the below :

"Administration": "Server=localhost; User Id=sa1; Password=myPassw@rd; Database=IntegrationServices_Administration; TrustServerCertificate=true",
"AuditLoggingService": "Server=localhost; User Id=sa1; Password=myPassw@rd; Database=IntegrationServices_AuditLoggingService; TrustServerCertificate=true",
"SaasService": "Server=localhost; User Id=sa1; Password=myPassw@rd; Database=IntegrationServices_SaasService; TrustServerCertificate=true",
"AbpBlobStoring": "Server=localhost; User Id=sa1; Password=myPassw@rd; Database=IntegrationServices_BlobStoring; TrustServerCertificate=true"

I also tried the above with a remote sql server as well instead of localhost. I even tried with Trusted Connection. I have been trying every permutation and combination of the connection string to get this running however of no use.

I also made sure the credentials I am using is correct by logging into the sql server as well. I check every settings in SQL to make sure everything is turned on. I have been using this same database seerver to run one of my projects based out of ASPNETZero, so I don't think there is any issue with the connection string.

No matter how i do it I end up getting the below error :

Cannot open database "IntegrationServices_Administration" requested by the login. The login failed.
Login failed for user 'sa'.. Stack Trace:
   at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at Microsoft.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean ignoreSniOpenTimeout, TimeoutTimer timeout, Boolean withFailover)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString connectionOptions, SqlCredential credential, TimeoutTimer timeout)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(TimeoutTimer timeout, SqlConnectionString connectionOptions, SqlCredential credential, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance)
   at Microsoft.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, Boolean applyTransientFaultHandling, String accessToken, DbConnectionPool pool)
   at Microsoft.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
   at Microsoft.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at Microsoft.Data.ProviderBase.DbConnectionPool.WaitForPendingOpen()
--- End of stack trace from previous location ---
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenInternalAsync(Boolean errorsExpected, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransactionAsync(IsolationLevel isolationLevel, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.BeginTransactionAsync(CancellationToken cancellationToken)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextWithTransactionAsync(IUnitOfWork unitOfWork)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.CreateDbContextAsync(IUnitOfWork unitOfWork, String connectionStringName, String connectionString)
   at Volo.Abp.Uow.EntityFrameworkCore.UnitOfWorkDbContextProvider`1.GetDbContextAsync()
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetDbSetAsync()
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetQueryableAsync()
   at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository`2.GetListAsync(Boolean includeDetails, CancellationToken cancellationToken)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue`1.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Volo.Abp.PermissionManagement.DynamicPermissionDefinitionStore.UpdateInMemoryStoreCache()
   at Volo.Abp.PermissionManagement.DynamicPermissionDefinitionStore.EnsureCacheIsUptoDateAsync()
   at Volo.Abp.PermissionManagement.DynamicPermissionDefinitionStore.GetPermissionsAsync()
   at Volo.Abp.Authorization.Permissions.PermissionDefinitionManager.GetPermissionsAsync()
   at IntegrationServices.AdministrationService.Data.AdministrationServiceDataSeeder.SeedAdminPermissionsAsync(Nullable`1 tenantId) in C:\SourceCode\integration-microservices\services\administration\IntegrationServices.AdministrationService\Data\AdministrationServiceDataSeeder.cs:line 67
   at IntegrationServices.AdministrationService.Data.AdministrationServiceDataSeeder.SeedAsync(Nullable`1 tenantId) in C:\SourceCode\integration-microservices\services\administration\IntegrationServices.AdministrationService\Data\AdministrationServiceDataSeeder.cs:line 41
   at IntegrationServices.AdministrationService.Data.AdministrationServiceRuntimeDatabaseMigrator.SeedAsync() in C:\SourceCode\integration-microservices\services\administration\IntegrationServices.AdministrationService\Data\AdministrationServiceRuntimeDatabaseMigrator.cs:line 35
   at Volo.Abp.EntityFrameworkCore.Migrations.EfCoreRuntimeDatabaseMigratorBase`1.LockAndApplyDatabaseMigrationsAsync()
   at Volo.Abp.EntityFrameworkCore.Migrations.EfCoreRuntimeDatabaseMigratorBase`1.LockAndApplyDatabaseMigrationsAsync()
   at Volo.Abp.EntityFrameworkCore.Migrations.EfCoreRuntimeDatabaseMigratorBase`1.TryAsync(Func`1 task, Int32 maxTryCount)
2024-09-17 17:44:04.214 -07:00 [INF] Trying to acquire the distributed lock for database migration: Administration.
2024-09-17 17:44:04.249 -07:00 [INF] Distributed lock is acquired for database migration: Administration...
2024-09-17 17:44:15.183 -07:00 [INF] Seeding admin permissions.
2024-09-17 17:44:15.282 -07:00 [ERR] An error occurred using the connection to database 'IntegrationServices_Administration' on server 'localhost'.
2024-09-17 17:44:16.671 -07:00 [WRN] SqlException has been thrown. The operation will be tried 1 times more. Exception:

Note : I commented out the SQL for docker and using the SQL from my local system , rest all the docker infrastructure is working as the same.

I am using Multi Tenancy as well, if that helps with anything.

I suspect something else is wrong. I have sent the link with the code for administration micro service just fro you to understand and debug the issue .shiwei.liang@volosoft.com shiwei.liang@volosoft.com

  • ABP Framework version:Latest
  • UI Type: Angular
  • Database System: EF Core ( MySQL) / MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

We have a requirement where we have to connect to an external provider , however the workflow is the user has to login to Host and then Login To Tenant through account linking.

But what I have understood is there is no OAuth implementation for Host.

Can you guide me how to implement it at the Host level ?

Thanks Partha

  • ABP Framework version: Latest Version
  • UI Type: Angular /
  • Database System: MySQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separete
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am able to bring up all the microservices as well as the Angular App. When i click on Login it redirects me to the Auth Server and then it brings me back to the Angular App, and then it calls the api : https://dev.web-gateway.xxx.dev.aws.yyy.com/api/abp/application-configuration?includeLocalizationResources=false and i can see the berarer token as well , however the response i get is : "currentUser": { "isAuthenticated": false, "id": null, "tenantId": null, "impersonatorUserId": null, "impersonatorTenantId": null, "impersonatorUserName": null, "impersonatorTenantName": null, "userName": null, "name": null, "surName": null, "email": null, "emailVerified": false, "phoneNumber": null, "phoneNumberVerified": false, "roles": [], "sessionId": null },

which is probably not allowing me to login. So I am unable to understand if a valid token is passed (as i checked the token and compared with the token api) then why the response say isAuthenticated is false.

  • ABP Framework version: Latest
  • UI Type: Angular
  • Database System: MySQL
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth server Separete
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am trying to test Multi-Tenancy in the new module i just created. I am able to get the token and I can see the __tenantId being passed in the header. I put a logger in the module to check the TenantId and its always coming null

public class SampleController : VendorManagementController, ISampleAppService
{
    private readonly ISampleAppService _sampleAppService;
    private readonly ILogger<SampleController> _logger;

    public SampleController(ISampleAppService sampleAppService, ILogger<SampleController> logger)
    {
        _sampleAppService = sampleAppService;
        _logger = logger;
    }

    [HttpGet]
    public async Task<SampleDto> GetAsync()
    {
        if (CurrentTenant.Id.HasValue)
            _logger.LogInformation("TenantId :" + CurrentTenant.Id);
        else
            _logger.LogInformation("TenantId is null");
        return await _sampleAppService.GetAsync();
    }

    [HttpGet]
    [Route("authorized1")]
    [Authorize]
    public async Task<SampleDto> GetAuthorizedAsync()
    {
        return await _sampleAppService.GetAsync();
    }
}

I also tried to use Swagger and no success Can you help me understand how I can get the TenantId properly, is there any settings I need to switch on or something

Nuget Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, and please first use the search on the homepage. Provide us with the following info:

  • ABP Framework version:Latest Version
  • UI Type: Angular
  • Database System: EF Core (MySQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): Auth Server Separete
  • Exception message and full stack trace: ' Error NU1101: Unable to find package Volo.Abp.Commercial.Core. No packages exist with this id in source(s): nuget.abp.io, nuget.org. PackageSourceMapping is enabled'

I have all the proper Nuget.Config, in fact this was working few days back , now for the last 5 hours this has not been working. I am using Azure Devops Pipelines.

I need to understand how reliable the communication and package availability is in nuget.abp.io

Showing 1 to 10 of 11 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06