Activities of "dev@veek.vn"

Hi,

I'm working on Vue.js and I want to send a request to log in. The flow is to send the username and password, and then return the token to access data. Does this flow already exist, or do I need to implement a new grant type for it? If it exists, please help me activate it.

ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:

Hello,

I've added a new user through user migration with a user role, but I cannot log in to the app. When I remove the role, I can access the app. I'm not sure if I'm missing anything. Could you please help me with this?

I am using IdentityUser, UserManager, and RoleManager to create the user and role.

ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:

Hello,

I'm currently engaged in a data migration project for my application, utilizing the ABP Framework. I've hit a bit of a snag, particularly with filling in the PasswordHash and SecurityStamp fields for the AbpUsers table. The challenge lies in hashing passwords and generating values for the SecurityStamp in a way that meets the ABP Framework's security logic and standards. It seems like a specific approach is needed to ensure both security and system compatibility.

Could you kindly assist me in crafting the code necessary for these two fields?

Here are some details about my environment:

ABP Framework version: v7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): Yes Exception message and full stack trace: [Provide any relevant details] Steps to reproduce the issue:

Thank you so much for your time and assistance. Looking forward to your guidance.

Hi, I want to disable the audit for the API, but it doesn't work.

this is my code:

[RemoteService]
[Area("app")]
[ControllerName("Job")]
[Route("api/app/jobs")]`

[DisableAuditing]
[HttpGet]
[Route("sync-robot-drivers")]
public Task SyncRobotCodesHasDriver()
{
    return _jobAppService.SyncRobotCodesHasDriver();
}

Configure<AbpAspNetCoreAuditingOptions>(options =>
{
    var ignoredUrls = new[]
    {
        "/jobs",
    };
    
    foreach (var url in ignoredUrls)
    {
        options.IgnoredUrls.AddIfNotContains(url);
    }
});

ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:

Hi,

I created a job project and installed Hangfire, but I encountered an issue when running it. Please help me. If you need the full code, could you please provide me with an email address?

JobModule:

using AA.Core.BackOffice.Configurations;
using AA.Core.BackOffice.Jobs;
using AA.Core.BackOffice.MongoDB;
using Hangfire;
using Hangfire.Console;
using Hangfire.Mongo;
using Hangfire.Mongo.Migration.Strategies;
using Hangfire.Mongo.Migration.Strategies.Backup;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.BackgroundJobs.Hangfire;
using HangfireBasicAuthenticationFilter;
using MongoDB.Driver;

namespace AA.Core.BackOffice;

[DependsOn(typeof(AbpAutofacModule),
              typeof(AbpAspNetCoreSerilogModule),
              typeof(AbpBackgroundJobsHangfireModule),
              typeof(BackOfficeApplicationModule),
              typeof(BackOfficeDomainModule),
              typeof(BackOfficeMongoDbModule),
              typeof(AbpAutoMapperModule),
              typeof(AbpAspNetCoreMvcModule))]
public class BackOfficeJobModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        var configuration = context.Services.GetConfiguration();

        ConfigureHangfire(context, configuration);

        context.Services.AddAutoMapperObjectMapper<BackOfficeJobModule>();
        Configure<AbpAutoMapperOptions>(options => { options.AddMaps<BackOfficeJobModule>(validate: true); });

        var backOfficeApiConfig = (configuration.GetSection(nameof(BackOfficeApi))).Get<BackOfficeApi>();
        if (backOfficeApiConfig != null)
        {
            context.Services.AddSingleton(backOfficeApiConfig);
        }
    }

    private void ConfigureHangfire(ServiceConfigurationContext context, IConfiguration configuration)
    {
        // hangfire - disable retry
        GlobalJobFilters.Filters.Add(new AutomaticRetryAttribute { Attempts = 0 });

        var mongoUrlBuilder = new MongoUrlBuilder(configuration.GetConnectionString("Default"));
        var mongoClient     = new MongoClient(mongoUrlBuilder.ToMongoUrl());

        context.Services.AddHangfire(config => config.SetDataCompatibilityLevel(CompatibilityLevel.Version_170)
                                                     .UseSimpleAssemblyNameTypeSerializer()
                                                     .UseRecommendedSerializerSettings()
                                                     .UseConsole()
                                                     .UseMongoStorage(mongoClient,
                                                                      mongoUrlBuilder.DatabaseName,
                                                                      new MongoStorageOptions
                                                                      {
                                                                          MigrationOptions = new MongoMigrationOptions
                                                                          {
                                                                              MigrationStrategy = new MigrateMongoMigrationStrategy(),
                                                                              BackupStrategy    = new CollectionMongoBackupStrategy()
                                                                          },
                                                                          Prefix                  = "HangfireJob",
                                                                          CheckConnection         = false,
                                                                          CheckQueuedJobsStrategy = CheckQueuedJobsStrategy.TailNotificationsCollection
                                                                      }));

        context.Services.AddHangfireServer(serverOptions =>
        {
            serverOptions.ServerName    = "HangfireJob";
            serverOptions.ServerTimeout = TimeSpan.FromMinutes(10);
        });
    }

    public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        var env = context.GetEnvironment();

        app.UseForwardedHeaders();
        
        // Configure the HTTP request pipeline.
        if (env.IsDevelopment())
        {
            app.UseExceptionHandler("/Error");

            // // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
            // app.UseHsts();
        }
        
        app.UseHsts();
        
        app.UseStaticFiles();
        app.UseRouting();
        app.UseConfiguredEndpoints();

        app.UseHangfireDashboard("", new DashboardOptions
        {
            Authorization = new[] { new HangfireCustomBasicAuthenticationFilter { User = "admin", Pass = "123321" } }
        });
        
        app.UseHttpsRedirection();

        var hostEnvironment = context.ServiceProvider.GetRequiredService<IHostEnvironment>();

        InitJobs.Setup(hostEnvironment);
    }
}
System.InvalidOperationException: StatusCode cannot be set because the response has already started.
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ThrowResponseAlreadyStartedException(String value)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.set_StatusCode(Int32 value)
   at Hangfire.Dashboard.AspNetCoreDashboardMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.Builder.Extensions.MapMiddleware.InvokeCore(HttpContext context, PathString matchedPath, PathString remainingPath)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication`1 application)
Question

Hello,

I have saved data to Redis using IDistributedCache, but the key in Redis is excessively long. How can I configure the prefix of the key?

Thanks, Veek

ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:

Hello ABP Team,

Hope you're doing well! I've been working on integrating a custom component in the Settings tab of our Administration menu and it's been an exciting journey so far. However, I've hit a bit of a snag and could really use your expertise.

Here's the scoop: When I navigate through our app the usual way (starting from Home, then to Settings, and finally landing on My config page), everything runs like a charm – the component behaves just as expected. But, if I refresh the page and hop back onto My config page, I'm greeted by a pesky error that goes like this: I added my component in this way:

Thank you in advance for your assistance and I look forward to your response.

Best regards, Veek

ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:

Hi,

I was wondering if there is a way to add additional settings to Administration pages,

Beside, I want to add main menu and sub menus in Angular?

ABP Framework version: v.7.3.2 UI Type: Angular Database System: MongoDB Tiered (for MVC) or Auth Server Separated (for Angular): yes Exception message and full stack trace: Steps to reproduce the issue:

Hello!

I've recently set up a passwordless system in ABP where users enter their phone number, receive an OTP on their mobile, and then input this OTP on the website. Once the OTP is verified, I need to generate a token that will be sent back to the client. This token is then used for accessing the app and retrieving data.

Could you guide me on how to generate this token to send back to the client? Thanks a lot! Please note that this token is something similar to machine-to-machine token when there is no human interaction or confirmation

ABP Framework version: v.7.3.2

  • UI Type: Angular
  • Database System: MongoDB
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
Showing 11 to 19 of 19 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35