"ademaygun" की गतिविधियाँ

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.

  • ABP Framework version: v4.4.4

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): yes

  • Exception message and stack trace:

  • Steps to reproduce the issue:"

  • I created a new solution with seperate IdentityServer via following cli command: abp new Acme.BookStore --separate-identity-server -csf -dbms PostgreSql -u angular -m none -t app-pro -v 4.4.4

  • I changed connection strings

    • .host and .DbMigrator connectionstring --> Host=localhost;Port=5432;Database=BookStoreDb;User ID=postgres;Password=1234;
    • .IdentityServer connectionstring --> Host=localhost;Port=5432;Database=IdentityServerDb;User ID=postgres;Password=1234;
  • I executed dotnet run in .DbMigrator folder.

All tables created in BookStoreDb but nothing happened in IdentityServerDb. How can I create seperate IdentityServer Database ?

  • ABP Framework version: v5.1.3
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
SELECT a."Id", a."ConcurrencyStamp", a."CreationTime", a."ExtraProperties", a."IsAbandoned", a."JobArgs", a."JobName", a."LastTryTime", a."NextTryTime", a."Priority", a."TryCount"
FROM "AbpBackgroundJobs" AS a
WHERE NOT (a."IsAbandoned") AND (a."NextTryTime" <= @__now_0)
ORDER BY a."Priority" DESC, a."TryCount", a."NextTryTime"
LIMIT @__p_1
Loaded 'C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.2\System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
[14:27:52 ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Abp.BackgroundJobs.EntityFrameworkCore.BackgroundJobsDbContext'.
System.InvalidCastException: Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateAndGetLength(DateTime value, NpgsqlParameter parameter)
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateObjectAndGetLength(Object value, NpgsqlLengthCache& lengthCache, NpgsqlParameter parameter)
   at Npgsql.NpgsqlParameter.ValidateAndGetLength()
   at Npgsql.NpgsqlParameterCollection.ValidateAndBind(ConnectorTypeMapper typeMapper)
   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(AsyncEnumerator enumerator, 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()
System.InvalidCastException: Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateAndGetLength(DateTime value, NpgsqlParameter parameter)
   at Npgsql.Internal.TypeHandlers.DateTimeHandlers.TimestampTzHandler.ValidateObjectAndGetLength(Object value, NpgsqlLengthCache& lengthCache, NpgsqlParameter parameter)
   at Npgsql.NpgsqlParameter.ValidateAndGetLength()
   at Npgsql.NpgsqlParameterCollection.ValidateAndBind(ConnectorTypeMapper typeMapper)
   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(AsyncEnumerator enumerator, 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()
  • Steps to reproduce the issue:"

  • I create a new solution via Abp Suite (Postgres)

  • Add Migration (Initial)

  • Run solution

  • I get above error in logs.txt

Note:

  • If I put floowing code in program.cs error goes away. AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);
  • This could be considered a bug

Also adding case insensitive filter would be very useful.

  • ABP Framework version: v4.3.3
  • UI type: Angular
  • DB provider: EF Core

Link User paging is not working ? I cannot see second page on users altough I switch the second page. Although it should show last seven records on second page , it still shows first 10 records. Also in Turkish link users page comes with two meaningless scrolls.

Note:I think it is a bug , so I have written same issue in bugs&issues but I didn't get any answer from support about it.

उत्तर

Link User paging is not working ? I cannot see second page on users altough I switch the second page. Although it should show last seven records on second page , it still shows first 10 records. Also in Turkish link users page comes with two meaningless scrolls.

We found the problem. There was a line in en.json:

"": "",

I think in this case the error message doesn't describe exactly what the problem is.

  • ABP Framework version: v4.3.3
    • ABP Suite version: v4.3.0
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • **Volo.Abp.AbpException: The key is empty in given json string. at Volo.Abp.Localization.Json.JsonLocalizationDictionaryBuilder.BuildFromJsonString(String jsonString) at Volo.Abp.Localization.VirtualFiles.Json.JsonVirtualFileLocalizationResourceContributor.CreateDictionaryFromFileContent(String jsonString) at Volo.Abp.Localization.VirtualFiles.VirtualFileLocalizationResourceContributorBase.CreateDictionaryFromFile(IFileInfo file) at Volo.Abp.Localization.VirtualFiles.VirtualFileLocalizationResourceContributorBase.CreateDictionaries() at Volo.Abp.Localization.VirtualFiles.VirtualFileLocalizationResourceContributorBase.GetDictionaries() at Volo.Abp.Localization.VirtualFiles.VirtualFileLocalizationResourceContributorBase.GetOrNull(String cultureName, String name) at Volo.Abp.Localization.LocalizationResourceContributorList.GetOrNull(String cultureName, String name) at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.GetLocalizedStringOrNull(String name, String cultureName, Boolean tryDefaults) at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.GetLocalizedString(String name, String cultureName) at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.GetLocalizedString(String name) at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.get_Item(String name) at Volo.Abp.AspNetCore.Mvc.AbpDataAnnotationAutoLocalizationMetadataDetailsProvider.<>c__DisplayClass4_0.<CreateDisplayMetadata>b__0() at Microsoft.AspNetCore.Mvc.ModelBinding.Metadata.DefaultModelMetadata.get_DisplayName() at Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata.GetDisplayName() at Microsoft.AspNetCore.Mvc.DataAnnotations.DataAnnotationsModelValidator.Validate(ModelValidationContext validationContext) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.ValidateNode() at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.VisitSimpleType() at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.VisitImplementation(ModelMetadata& metadata, String& key, Object model) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.Visit(ModelMetadata metadata, String key, Object model) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.VisitChildren(IValidationStrategy strategy) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.VisitComplexType(IValidationStrategy defaultStrategy) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.VisitImplementation(ModelMetadata& metadata, String& key, Object model) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.Visit(ModelMetadata metadata, String key, Object model) at Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationVisitor.Validate(ModelMetadata metadata, String key, Object model, Boolean alwaysValidateAtTopLevel, Object container) at Microsoft.AspNetCore.Mvc.ModelBinding.ObjectModelValidator.Validate(ActionContext actionContext, ValidationStateDictionary validationState, String prefix, Object model, ModelMetadata metadata, Object container) at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.EnforceBindRequiredAndValidate(ObjectModelValidator baseObjectValidator, ActionContext actionContext, ParameterDescriptor parameter, ModelMetadata metadata, ModelBindingContext modelBindingContext, ModelBindingResult modelBindingResult, Object container) at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.BindModelAsync(ActionContext actionContext, IModelBinder modelBinder, IValueProvider valueProvider, ParameterDescriptor parameter, ModelMetadata metadata, Object value, Object container) at Microsoft.AspNetCore.Mvc.Controllers.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) **:

I created entities with Abp Suite. I am trying to post entity with postman. But I got above error although name has value in json. If I remove [Required] exception losts.

public class ServiceBalanceChangeReasonCreateDto
{
    [Required]
    public string Name { get; set; }
}
public virtual async Task<ServiceBalanceChangeReasonDto> CreateAsync(ServiceBalanceChangeReasonCreateDto input)
{
...
...
}

EDIT : This error occurs on all Required usages in CreateOrUpdate..Dtos (all AppService methods) we got this error in all enviroments(debug,stage and prod)

81 प्रविष्टियों में 61 से 70 दिखा रहा है
Made with ❤️ on ABP v8.2.0-preview Updated on मार्च 25, 2024, 15:11