Activities of "ademaygun"

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, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.3.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
  • On Abp Suite
  • Create New Solution via Abp Suite
  • Modules-> Create New Module (Add a Solution is selected)
  • Add Existing Solution --> (Created Module path) on Main page
  • Crud Page Generator --> Add New Entity(and add an any property) ( Create Back End and Create UI is selected)
  • click save&generate

Abp suite doesn't create UI Pages if Abp solution is a module. Is there a bug or is this impossible?

  • ABP Framework version: v5.2.1
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I create an entity with Abp Suite. Update method was created like this:

public async Task<<Product>> UpdateAsync(
            Guid id,
            string type
        )
        {
            var queryable = await _productRepository.GetQueryableAsync();
            var query = queryable.Where(x => x.Id == id);

            var product = await AsyncExecuter.FirstOrDefaultAsync(query);

            product.Type = type;

            return await _productRepository.UpdateAsync(product);
        }

Why isn't the method created like this?

public async Task<<Product>> UpdateAsync(
            Guid id,
            string type
        )
        {
            var product  = await _productRepository.GetAsync(id);
            product.Type = type;

            return await _productRepository.UpdateAsync(product);
        }

we changed nothing. we sent connection information to your email.

  • ABP Framework version: v4.4.4
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Today we faced a really critical problem, all logged in user's in the system (belongs to different tenants) started to be behave like logged in via same tenant and user like XTenant\XUser to the system. Angular side was showing this same tenant and user in top of the right (profile) area. In thi situation we opened Linked Accounts and screen was like below. The problem has been solved after restarting service (app). This problem occured second time. Because of the user's belongs to different tenants see the unrelated (unauthorized) data, this problem is really critical for us. We need urgent support for this.

We are not sure if related with problem, but want to share as an extra information, we realised below error on logs approximately same time:

Invalid extension grant{"error":"TheTargetUserIsNotLinkedToYou"}, details: {"ClientId":"MyApp_App","ClientName":"MyApp_App","GrantType":"LinkLogin","Scopes":"XProject offline_access","AuthorizationCode":"********","RefreshToken":"********","UserName":null,"AuthenticationContextReferenceClasses":null,"Tenant":null,"IdP":null,"Raw":{"grant_type":"LinkLogin","LinkUserId":"39fb9b1b-1ccc-51d0-f52a-964600e6ed13","access_token":"**","client_id":"MyApp_App","client_secret":"***REDACTED***","scope":"offline_access XProject","LinkTenantId":"3a031155-0c87-72e8-5057-48a94e23fce3"},"$type":"TokenRequestValidationLog"}

Note:There are 162 rows in AbpLinkUsers table

In my opinion

DefaultExceptionToErrorInfoConverter.cs:

protected virtual Exception TryToGetActualException(Exception exception)
    {
        if (exception.InnerException != null)
        {
            if (exception.InnerException is AbpValidationException ||
                exception.InnerException is AbpAuthorizationException ||
                exception.InnerException is EntityNotFoundException ||
                exception.InnerException is IBusinessException)
            {
                return exception.InnerException;
            }
        }
        return exception;
    }

instead of :

protected virtual Exception TryToGetActualException(Exception exception)
    {
        if (exception is AggregateException && exception.InnerException != null)
        {
            var aggException = exception as AggregateException;
            if (aggException.InnerException is AbpValidationException ||
                aggException.InnerException is AbpAuthorizationException ||
                aggException.InnerException is EntityNotFoundException ||
                aggException.InnerException is IBusinessException)
            {
                return aggException.InnerException;
            }
        }
        return exception;
    }

I realise user may send me wrong modal screenshot, so we discard ui side of problem for now.

I want to ask while logs.txt is like i am expecting, why AbpAuditLogs different than logs.txt like below

logs.txt (as expecting) :

"code": "Xproject:00132",
"message": "Vergi Dairesi Alanı Eşleşmedi",

AbpAuditLogs :

"code": "Xproject:00132",
"message": "Exception of type 'MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException' was thrown.",
  • ABP Framework version: v5.1.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:

I am getting error when submit a record on UI page ("An error occured"):

and AbpAuditLogs.exceptions :

[
  {
    "code": "Xproject:00132",
    "message": "Exception of type 'MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException' was thrown.",
    "details": "TaxOfficeNotMatchException: Exception of type 'MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException' was thrown.\nSTACK TRACE:    at MyCompany.Xproject.Addresses.AddressManager.CheckTaxOfficeAsync(String taxOffice) in C:\\MyCompany\\Repos\\MyCompany.ECOM.Misc\\MyCompany.Xproject\\aspnet-core\\src\\MyCompany.Xproject.Domain\\Addresses\\AddressManager.cs:line 120\n   at MyCompany.Xproject.Addresses.AddressManager.CreateAsync(Int32 countryId, Nullable`1 municipalityId, Nullable`1 neighbourhoodId, Nullable`1 parentId, Nullable`1 cityId, String salutation, String contactName, String contactSurName, String countryPhonePrefix, String phone, String eMail, String companyTitle, String companyDepartment, String iossNr, String postalCode, String addressText, String taxOffice, String taxNr, String idNr, IndividualCorporateType individualCorporateTypeId, DeliveryType deliveryTypeId, Decimal code, Nullable`1 adressTypeId, Boolean deliveryAndInvoiceAddressSame) in C:\\MyCompany\\Repos\\MyCompany.ECOM.Misc\\MyCompany.Xproject\\aspnet-core\\src\\MyCompany.Xproject.Domain\\Addresses\\AddressManager.cs:line 55\n   at MyCompany.Xproject.Addresses.AddressesAppService.CreateAsync(AddressCreateDto input) in C:\\MyCompany\\Repos\\MyCompany.ECOM.Misc\\MyCompany.Xproject\\aspnet-core\\src\\MyCompany.Xproject.Application\\Addresses\\AddressAppService.cs:line 263\n   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\n   at 

but message in logs.txt looks like it should

2022-06-07 14:36:18.774 +03:00 [WRN] ---------- RemoteServiceErrorInfo ----------
{
  "code": "Xproject:00132",
  "message": "Vergi Dairesi Alanı Eşleşmedi",
  "details": null,
  "data": {},
  "validationErrors": null
}

2022-06-07 14:36:18.774 +03:00 [WRN] Exception of type 'MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException' was thrown.
MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException: Exception of type 'MyCompany.Xproject.Domain.Addresses.Exceptions.TaxOfficeNotMatchException' was thrown.
   at MyCompany.Xproject.Addresses.AddressManager.CheckTaxOfficeAsync(String taxOffice) in C:\MyCompany\Repos\MyCompany.ECOM.Misc\MyCompany.Xproject\aspnet-core\src\MyCompany.Xproject.Domain\Addresses\AddressManager.cs:line 120
   at MyCompany.Xproject.Addresses.AddressManager.CreateAsync(Int32 countryId, Nullable`1 municipalityId, Nullable`1 

I don't manage exception manually. (there is no any try-catch block)

private async Task CheckTaxOfficeAsync(string taxOffice)
        {
            if (!string.IsNullOrEmpty(taxOffice))
            {
                var address = (await _taxOfficeRepository.GetQueryableAsync()).Any(x => x.Name == taxOffice);
                if (!address)
                {
                    throw new TaxOfficeNotMatchException();
                }
            }
        }
public class TaxOfficeNotMatchException : BusinessException
    {
        public TaxOfficeNotMatchException()
            : base(XprojectErrorCodes.XprojectTaxOfficeNotMatchError)
        {
        }
    }

Hi, Regarding your message I changed connectionstring name IdentityServer --> AbpIdentityServer then db migrator worked successfully.

Hi Maliming, In last message I tried to explain with detail. I already seperated database connection strings and add second dbcontext, but I got error when I run dbmigrator, IdentityServerDataSeedContributor tried to run via Default connection string. It should use IdentityServer connection string.How can I do this?

I created IdentityServerDbContext according to docs.

  • moved builder.ConfigureIdentityServer(); into IdentityDbContext(SecondDbContext)
  • Got relation ***does not exists(Db errors) errors, so added other (bellow) builder configurators :
builder.ConfigureIdentityServer();
builder.ConfigureIdentityPro();
builder.ConfigureLanguageManagement();
builder.ConfigureSettingManagement();
builder.ConfigureAuditLogging();
builder.ConfigureFeatureManagement();
builder.ConfigureTextTemplateManagement();
 

*then IDS project started with no inital data, so we run .DbMigrator project and got below error:


An exception occurred while iterating over the results of a query for context type 'Volo.Abp.IdentityServer.EntityFrameworkCore.IdentityServerDbContext'.
Npgsql.PostgresException (0x80004005): 42P01: relation "IdentityServerIdentityResources" does not exist
   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 
operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
  Exception data:
    Severity: ERROR
    SqlState: 42P01
    MessageText: relation "IdentityServerIdentityResources" does not exist
    Position: 41
    File: parse_relation.c
    Line: 1194
    Routine: parserOpenTable
Npgsql.PostgresException (0x80004005): 42P01: relation "IdentityServerIdentityResources" does not exist
   at Npgsql.NpgsqlConnector.<ReadMessage>g__ReadMessageLong|194_0(NpgsqlConnector connector, Boolean async, DataRowLoadingMode dataRowLoadingMode, Boolean readingNotifications, Boolean isReadingPrependedMessage)
   at Npgsql.NpgsqlDataReader.NextResult(Boolean async, Boolean isConsuming, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteReader(CommandBehavior behavior, Boolean async, CancellationToken cancellationToken)
   at Npgsql.NpgsqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
   at Npgsql.EntityFrameworkCore.PostgreSQL.Storage.Internal.NpgsqlExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 
operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.Internal.SplitQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
   at Volo.Abp.IdentityServer.IdentityResources.IdentityResourceRepository.CheckNameExistAsync(String name, Nullable`1 expectedId, 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.IdentityServer.IdentityResources.IdentityResourceDataSeeder.AddIdentityResourceIfNotExistsAsync(IdentityResource resource)
   at Volo.Abp.IdentityServer.IdentityResources.IdentityResourceDataSeeder.CreateStandardResourcesAsync()
   at Ekol.FFE.IdentityServer.IdentityServerDataSeedContributor.SeedAsync(DataSeedContext context) in C:\Users\Adem.aygun\repos\Ekol.FFE\aspnet-core\src\Ekol.FFE.Domain\IdentityServer\IdentityServerDataSeedContributor.cs:line 59
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)
   at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter`1.InterceptAsync(IInvocation invocation, IInvocationProceedInfo proceedInfo, Func`3 proceed)
   at Volo.Abp.Data.DataSeeder.SeedAsync(DataSeedContext context)
   at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous(IInvocation invocation, IInvocationProceedInfo proceedInfo)
   at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapter.ProceedAsync()
   at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)

appsettings.json: (.Host and .DbMigrator projects)

"ConnectionStrings": {
    "Default": "Host=test;Port=5432;Database=test1;User ID=postgres;Password=****;",
    "IdentityServer":"Host=test;Port=5432;Database=idstest1;User ID=postgres;Password=****;"
  },

We want to use IDS as an SSO for our multiple Abp projects. Are we on the correct way and how can we work dbmigrator(IdentityServerDataSeedContributor) correctly.

Showing 61 to 70 of 88 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 19, 2024, 10:13