Activities of "kfrancis@clinicalsupportsystems.com"

We're working on upgrading our solution though we needed to migrate from IdentityServer to OpenIddict first. We followed this guide: https://docs.abp.io/en/commercial/latest/migration-guides/openIddict-step-by-step and https://docs.abp.io/en/commercial/latest/migration-guides/openIddict-mvc#web-project-tiered-solution and after a bit of fiddling with the application URLs we're getting the following:

ComponentNotRegisteredException: The requested service 'Volo.Abp.Account.Public.Web.Pages.Account.LogoutModel' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.

  • ABP Framework version: v6.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): Tiered/yes
  • Exception message and stack trace:
Autofac.ResolutionExtensions.ResolveService(IComponentContext context, Service service, IEnumerable<Parameter> parameters)
Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.DefaultPageModelFactoryProvider+<>c__DisplayClass3_0.<CreateModelFactory>b__0(PageContext pageContext)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.CreateInstance()
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeInnerFilterAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeNextResourceFilter()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
Volo.Abp.AspNetCore.Serilog.AbpSerilogMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Volo.Abp.AspNetCore.Auditing.AbpAuditingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in MiniProfilerMiddleware.cs
Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
Volo.Abp.AspNetCore.MultiTenancy.MultiTenancyMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext()
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
  • Steps to reproduce the issue:"
  • Login to the web app
  • Logout from the web app using the menu/logout

Expected: The user should be logged out Actual: This exception is shown when the user is directed to https://localhost:44357/Account/Logout

We're not using anything custom for auth, just the built-ins.

  • ABP Framework version: v6.0.0 RC1/RC2
  • Steps to reproduce the issue:"
  1. Run abp new Acme.MyMauiApp -t maui

Expected: The project should be created Actual:

[11:58:35 INF] ABP CLI (https://abp.io)
[11:58:35 INF] Version 6.0.0-rc.2 (Prerelease)
[11:58:35 INF] Creating your project...
[11:58:35 INF] Project name: Acme.MyMauiApp
[11:58:35 INF] Template: maui
[11:58:35 INF] Output folder: C:\Users\kfrancis\source\repos\testmaui2
Error occured while getting the latest version from https://abp.io/api/download/template/get-version/ : Remote server returns '404-Not Found'. Message: There is no template with name 'maui'!
[11:58:36 WRN] The remote service is currently unavailable, please specify the version.
[11:58:36 WRN]
[11:58:36 WRN] Find the following template in your cache directory:
[11:58:36 WRN]  Template Name   Version
[11:58:36 WRN]
[11:58:36 WRN] Use command: abp new Acme.BookStore -v version
Question

Question, we've been working on migrating an app for a long time and we're getting there (takes a long to migrate from .NET 4.8 to this solution) but one issue we disagree on is where to store user-session-related information.

For example, in the app a user has a bit of a state that gets set as they move through the app. We don't want to include that state in the query string (stateless) as it would be too cumbersome. In the old app we stored it in session but we're not sure that's the correct way to go about it.

We just tried adding a claim to store that information but because the value(s) can change so frequently, we're not sure that's a good solution either.

Any ideas? We want to make sure whatever solution we use is compatible with scaling the system horizontally in the future as we're dealing with large user loads.

  • ABP Framework version: v5.2.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

So, we're trying to setup testing for the devs so that when they create the db there are a ton of fake users covering a variety of our real world scenarios. Creating the users works fine but we're having a heck of a time setting up permissions so that when devs login to those accounts, they can use the system.

We'll create a tenant:

var tenant = await _tenantManager.CreateAsync(name: tenantName, editionId: editionId);
tenant = await _tenantRepository.InsertAsync(tenant, true);

Then we'll create the admin user:

IdentityUser user = new(_guidGenerator.Create(), userName ?? faker.Internet.UserName(), faker.Internet.Email(), tenantId: tenant.Id);
var createStatus = await _userManager.CreateAsync(user, CabMDConsts.AdminPasswordDefaultValue);
if (createStatus.Succeeded)
{
    var roleResult = await _userManager.AddToRoleAsync(user, "admin");
    if (roleResult.Succeeded) {
        // just in case we need to specify?
        var permissions = await _permissionManager.GetAllForRoleAsync(role);
        foreach (var p in permissions.Where(p => p.IsGranted))
        {
            await _permissionManager.SetForUserAsync(user.Id, p.Name, true);
        }
    } else {
        throw new InvalidOperationException($"Could not add user {user.UserName} to role {role}: {string.Join(", ", roleResult.Errors.Select(x => x.Description))}");
    }
}

But when we login as these users, there's no menu and they can't do anything within in the app. Looking at the menu contributor, I'm seeing this:

I can see in the AbpUserRoles table that there is an entry seemingly associating that "admin" role to the user:

Any ideas? How can we seed fake users who have default roles and the permissions associated with those roles for testing?

I think the issue is with this line:

filename = Path.Combine(Directory.GetCurrentDirectory(), "tempkey.rsa");

https://github.com/abpframework/abp/blob/e3e1779de6df5d26f01cdc8e99ac9cbcb3d24d3c/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AbpIdentityServerBuilderExtensions.cs#L76

Need to use an option there, or find some way to specify filename so that the GetCurrentDirectory isn't used in this context.

I understand that most aren't using WPF, but all of this would be relevant to WinUI/UWP as well - anything that would be deployed as a standalone app.

So, working on integrating abp with a WPF app (based on my sample here https://github.com/kfrancis/abp-wpf), I'm working on creating a Windows Application Packaging Project to install the WPF app, ultimately I want to deploy through appcenter.ms which requires appx/msix to distribute the app.

  • ABP Framework version: v5.1.3

The app works great, but after creating the installer it seems to be getting confused about the directory when it comes to some of the modules like AbpIdentityServerDomainModule in this case. When running AbpApplicationFactory.CreateAsync

Volo.Abp.AbpInitializationException
  HResult=0x80131500
  Message=An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.IdentityServer.AbpIdentityServerDomainModule, Volo.Abp.IdentityServer.Domain, Version=5.1.3.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details.
  Source=Volo.Abp.Core
  StackTrace:
   at Volo.Abp.AbpApplicationBase.<ConfigureServicesAsync>d__23.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at Volo.Abp.AbpApplicationFactory.<CreateAsync>d__0`1.MoveNext()
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at CabMD.McedtAdminWpf.Core.ApplicationBootstrapper.<InitializeIfNeedsAsync>d__6`1.MoveNext() in C:\Projects\CabMD15\aspnet-core\src\CabMD.McedtAdminWpf\Core\ApplicationBootstrapper.cs:line 25

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
UnauthorizedAccessException: Access to the path 'C:\Windows\system32\tempkey.jwk' is denied.

So, is there an option that I can tell it the correct directory Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) in this case?

To reproduce:

  1. Clone the abp-wpf sample
  2. Add a WAP project
  3. Try to run the WAP project.

Expected: The app should run normally. Actual: An exception occurs during module initialization.

Answer

Working on something here: https://github.com/kfrancis/abp-wpf

Question

I know there is a WPF template now, but is there any sample that could be shared that shows at least some structure/mvvm in use? Right now we're trying to port a Prism-based WPF app but Prism doesn't play nicely with Microsoft DI and we've been having a hell of a time getting something to work so it would be useful to get some advice from the experts ..

FreshMvvm? I was playing with Maui as well and FreshMvvm has some Maui integration so this would be nice for both.

The issue still persists and we're on v5.0.0 RC1 now. The last article made no difference either, all of those things were already in place.

Showing 31 to 40 of 61 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 05:21