Starts in:
2 DAYS
16 HRS
43 MIN
12 SEC
Starts in:
2 D
16 H
43 M
12 S

Activities of "hansmogren"

Hi!

We run an ABP application hosted in an Azure App Service. Everything works fine but when we enable this setting in Application Insights we can no longer access the login page (/Account/Login) and the application seems to crash when we try to load the login page. This is logged:

2021-12-23 16:52:48.465 +00:00 [INF] Request starting HTTP/1.1 GET https://www.example.com/Account/Login - -
2021-12-23 16:52:48.631 +00:00 [INF] Executing endpoint '/Account/Login'
2021-12-23 16:52:48.787 +00:00 [INF] Route matched with {page = "/Account/Login", action = "", controller = "", area = ""}. Executing page /Account/Login
2021-12-23 16:53:15.770 +00:00 [INF] Azure Web Sites environment detected. Using 'C:\home\ASP.NET\DataProtection-Keys' as key repository; keys will not be encrypted at rest.
2021-12-23 16:53:33.872 +00:00 [INF] Application started. Press Ctrl+C to shut down.
2021-12-23 16:53:33.874 +00:00 [INF] Hosting environment: Production
2021-12-23 16:53:33.874 +00:00 [INF] Content root path: C:\home\site\wwwroot

The start page is still working fine. Any ideas what is happening here?

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

Hi!

Is there any way we can customize the error response from the /connect/token endpoint depending on what kind of error did occur? For example right now the only way to determine if the user's password is incorrect or if the user has not yet verified their email address is to look at the error_description field (which should not be used to react to errors).

// Incorrect password:

{
  "error": "invalid_grant",
  "error_description": "Invalid username or password!"
}

// Not verified email address:

{
  "error": "invalid_grant",
  "error_description": "You are not allowed to login! You need to confirm your email/phone number."
}
  • ABP Framework version: v4.4.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"
Question

Hi,

Is ABP v4.4.x fully compatible with .NET 6?

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

Hi,

We're getting this error message when running ef migrations and can't figure out why. Any pointers where we should look`?

The property 'AppUser.ExtraProperties' could not be mapped because it is of type 'ExtraPropertyDictionary', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'

  • ABP Framework version: v4.4.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
> dotnet ef migrations list
Build started...
Build succeeded.
System.InvalidOperationException: The property 'AppUser.ExtraProperties' could not be mapped because it is of type 'ExtraPropertyDictionary', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.ValidatePropertyMapping(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Infrastructure.RelationalModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.SqlServer.Internal.SqlServerModelValidator.Validate(IModel model, IDiagnosticsLogger`1 logger)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.ValidatingConvention.ProcessModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.ImmediateConventionScope.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Conventions.Internal.ConventionDispatcher.OnModelFinalized(IModel model)
   at Microsoft.EntityFrameworkCore.Metadata.Internal.Model.FinalizeModel()
   at Microsoft.EntityFrameworkCore.ModelBuilder.FinalizeModel()
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.CreateModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Infrastructure.ModelSource.GetModel(DbContext context, IConventionSetBuilder conventionSetBuilder, ModelDependencies modelDependencies)
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.CreateModel()
   at Microsoft.EntityFrameworkCore.Internal.DbContextServices.get_Model()
   at Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder.<>c.<TryAddCoreServices>b__7_3(IServiceProvider p)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitCache(ServiceCallSite callSite, RuntimeResolverContext context, ServiceProviderEngineScope serviceProviderEngine, RuntimeResolverLock lockType)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScopeCache(ServiceCallSite singletonCallSite, RuntimeResolverContext context)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(ServiceCallSite callSite, TArgument argument)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.<RealizeService>b__0(ServiceProviderEngineScope scope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
   at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService[T](IServiceProvider provider)
   at Microsoft.EntityFrameworkCore.DbContext.get_DbContextDependencies()
   at Microsoft.EntityFrameworkCore.DbContext.get_InternalServiceProvider()
   at Microsoft.EntityFrameworkCore.DbContext.Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<System.IServiceProvider>.get_Instance()
   at Microsoft.EntityFrameworkCore.Infrastructure.Internal.InfrastructureExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Infrastructure.AccessorExtensions.GetService[TService](IInfrastructure`1 accessor)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(Func`1 factory)
   at Microsoft.EntityFrameworkCore.Design.Internal.DbContextOperations.CreateContext(String contextType)
   at Microsoft.EntityFrameworkCore.Design.Internal.MigrationsOperations.GetMigrations(String contextType, String connectionString, Boolean noConnect)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.GetMigrationsImpl(String contextType, String connectionString, Boolean noConnect)
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.GetMigrations.<>c__DisplayClass0_0.<.ctor>b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.<>c__DisplayClass4_0`1.&lt;Execute&gt;b__0()
   at Microsoft.EntityFrameworkCore.Design.OperationExecutor.OperationBase.Execute(Action action)
The property 'AppUser.ExtraProperties' could not be mapped because it is of type 'ExtraPropertyDictionary', which is not a supported primitive type or a valid entity type. Either explicitly map this property, or ignore it using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'.
  • Steps to reproduce the issue: Run dotnet ef migrations list

I want to use https://github.com/koenbeuk/EntityFrameworkCore.Triggered in my ABP solution but I can't figure out how to register the triggers with my AbpDbContext.

This is what the documentation for EntityFrameworkCore.Triggered suggests:

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services
            .AddDbContext<ApplicationContext>(options => {
                options.UseTriggers(triggerOptions => {
                    triggerOptions.AddTrigger<MyTrigger>();
                });
            })
    }
}

How can I use this library with with ABP?

Hi!

We use bearer / token authentication for a mobile app that communicates with our web api. As of now requests that do not contain a proper bearer token will get a response with http status code 302 and the location header with a value like https://example.com/Account/Login?ReturnUrl=/api/foo/bar. How can we change this behaviour and insted return a 401 “Unauthorized” response for requests that do not contain a proper bearer token?

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

Hi!

In the identity server user interface we can provide allowed cors origins for our clients. Is this supposed to work out-of-the-box or do we need to add code anywhere? Do we need to add the CORS middleware ourselves, and in that case how do we connect it to the clients and origins stored in the IdentityServerClientCorsOrigins table?

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

Hi!

I installed the File Management Module installed using ABP CLI and configured it to use Azure Blob Storage as backing storage.

When I go to Administration / File Management I get an error message "An internal error occured during your request!":

Why is this? Is there some configuration I've forgot? I've tried with different Azure connection strings used without problems with other applications.

        private void ConfigureBlobStorage(ServiceConfigurationContext context)
        {
            var configuration = context.Services.GetConfiguration();
            var connectionString = configuration.GetValue<string>("BlobStorage:ConnectionString");
            var containerName = configuration.GetValue<string>("BlobStorage:ContainerName");

            Configure<AbpBlobStoringOptions>(options =>
            {
                options.Containers.Configure<FileManagementContainer>(blobContainer =>
                {
                    blobContainer.UseAzure(azure =>
                    {
                        azure.ConnectionString = connectionString;
                        azure.ContainerName = containerName;
                    });
                });
            });
        }
  • ABP Framework version: v4.2.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
[ERR] An exception was thrown while activating Volo.FileManagement.Web.Pages.FileManagement.Directory.CreateModalModel -> Volo.FileManagement.Directories.DirectoryDescriptorAppService -> Volo.FileManagement.Directories.DirectoryManager -> Volo.FileManagement.Files.FileManager -> Volo.Abp.BlobStoring.BlobContainer`1[[Volo.FileManagement.FileManagementContainer, Volo.FileManagement.Domain, Version=4.2.2.0, Culture=neutral, PublicKeyToken=null]].
Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.Web.Pages.FileManagement.Directory.CreateModalModel -> Volo.FileManagement.Directories.DirectoryDescriptorAppService -> Volo.FileManagement.Directories.DirectoryManager -> Volo.FileManagement.Files.FileManager -> Volo.Abp.BlobStoring.BlobContainer`1[[Volo.FileManagement.FileManagementContainer, Volo.FileManagement.Domain, Version=4.2.2.0, Culture=neutral, PublicKeyToken=null]].
 ---> Autofac.Core.DependencyResolutionException: An exception was thrown while invoking the constructor 'Void .ctor(Volo.Abp.BlobStoring.IBlobContainerFactory)' on type 'BlobContainer`1'.
 ---> Volo.Abp.AbpException: Could not find the BLOB Storage provider with the type (Volo.Abp.BlobStoring.Azure.AzureBlobProvider, Volo.Abp.BlobStoring.Azure, Version=4.2.2.0, Culture=neutral, PublicKeyToken=null) configured for the container file-management and no default provider was set.
   at Volo.Abp.BlobStoring.DefaultBlobProviderSelector.Get(String containerName)
   at Volo.Abp.BlobStoring.BlobContainerFactory.Create(String name)
   at lambda_method3170(Closure , Object[] )
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   --- End of inner exception stack trace ---
   at Autofac.Core.Activators.Reflection.BoundConstructor.Instantiate()
   at Autofac.Core.Activators.Reflection.ReflectionActivator.ActivateInstance(IComponentContext context, IEnumerable`1 parameters)
   at Autofac.Core.Activators.Reflection.ReflectionActivator.<ConfigurePipeline>b__11_0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Builder.RegistrationBuilder`3.&lt;&gt;c__DisplayClass41_0.&lt;PropertiesAutowired&gt;b__0(ResolveRequestContext ctxt, Action`1 next)
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   --- End of inner exception stack trace ---
   at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.SharingMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.Middleware.CircularDependencyDetectorMiddleware.Execute(ResolveRequestContext context, Action`1 next)
   at Autofac.Core.Resolving.ResolveOperation.GetOrCreateInstance(ISharingLifetimeScope currentOperationScope, ResolveRequest request)
   at Autofac.Core.Resolving.ResolveOperation.ExecuteOperation(ResolveRequest request)
   at Autofac.ResolutionExtensions.TryResolveService(IComponentContext context, Service service, IEnumerable`1 parameters, Object& instance)
   at Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable`1 parameters)
   at Volo.Abp.AspNetCore.Mvc.UI.RazorPages.ServiceBasedPageModelActivatorProvider.<>c__DisplayClass0_0.<CreateActivator>b__0(PageContext context)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelFactoryProvider.<>c__DisplayClass3_0.<CreateModelFactory>b__0(PageContext pageContext)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.CreateInstance()
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
  • Steps to reproduce the issue:
    1. Install File Management Module
    2. Run application
    3. Browse to Administration / File Management

Hi! After upgrading to 4.2.2 from 3.3.1 our "change password" function that we call from our custom built front-end does not work anymore. I suspect it has to do with the changes described in the migration guide here: https://docs.abp.io/en/abp/latest/Migration-Guides/Abp-4_0#identityoptions-usage since it seems like the password related settings we've set in ABP settings are not being used.

We are simply calling

var result = await _userManager.ChangePasswordAsync(user, currentPassword, newPassword);

and the userManager injected is Microsoft.AspNetCore.Identity.UserManager<Volo.Abp.Identity.IdentityUser>.

Now, we've got it to work by injecting IOptions<IdentityOptions> and calling the SetAsync method as described:

await _options.SetAsync();
var result = await _userManager.ChangePasswordAsync(user, currentPassword, newPassword);

Is this correct usage or is there a better way?

  • ABP Framework version: v4.2.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:
Showing 1 to 9 of 9 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06