Starts in:
2 DAYS
15 HRS
56 MIN
50 SEC
Starts in:
2 D
15 H
56 M
50 S

Activities of "hansmogren"

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:

Did you add the module dependcy?

[DependsOn(typeof(AbpBlobStoringAzureModule))]

Thank you, that was it!

By the way, should both the DependsOn attribute and the code where I configure FileManagementContainer & AbpBlobStoringOptions to use Azure go in my ProjectName.Application or in the ProjectName.Web module?

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

You are right, calling the SetAsync method is the right way.

Thank you!

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 21 to 25 of 25 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06