Activities of "dev@veek.vn"

hi,

var user = new BsonDocument
                    {
                        {
                            "_id",
                            new BsonBinaryData(Guid.NewGuid(), GuidRepresentation.Standard)
                        },
                        { "ConcurrencyStamp", Guid.NewGuid().ToString().Replace("-", "") },
                        { "CreationTime", DateTime.UtcNow },
                        { "CreatorId", BsonNull.Value },
                        { "LastModificationTime", DateTime.UtcNow },
                        { "LastModifierId", BsonNull.Value },
                        { "IsDeleted", false },
                        { "DeleterId", BsonNull.Value },
                        { "DeletionTime", BsonNull.Value },
                        { "TenantId", BsonNull.Value },
                        { "UserName", "admin2" },
                        { "NormalizedUserName", "ADMIN2" },
                        { "Name", "admin2" },
                        { "Surname", BsonNull.Value },
                        { "Email", "admin2@abp.io" },
                        { "NormalizedEmail", "ADMIN2@ABP.IO" },
                        { "EmailConfirmed", false },
                        {
                            "PasswordHash",
                            _passwordHasher.HashPassword(null, "1q2w3E*")
                        },
                        { "SecurityStamp", Guid.NewGuid().ToString().Replace("-", "") },
                        { "IsExternal", false },
                        { "PhoneNumber", "" },
                        { "PhoneNumberConfirmed", false },
                        { "IsActive", true },
                        { "TwoFactorEnabled", false },
                        { "LockoutEnd", new BsonArray() },
                        { "LockoutEnabled", true },
                        { "AccessFailedCount", 0 },
                        { "ShouldChangePasswordOnNextLogin", false },
                        { "EntityVersion", 0 },
                        {
                            "LastPasswordChangeTime", new BsonArray()
                        },
                        {
                            "Roles", new BsonArray()
                        },
                        { "Claims", new BsonArray() },
                        { "Logins", new BsonArray() },
                        { "Tokens", new BsonArray() },
                        { "OrganizationUnits", new BsonArray() }
                    };
                    await collection.InsertOneAsync(user);

update this and still issue

the issue message when I login to the app: Value cannot be null. (Parameter 'source') System.ArgumentNullException: Value cannot be null. (Parameter 'source') at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument) at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable1 source, Func2 selector) at Volo.Abp.Identity.IdentityUserStore.GetClaimsAsync(IdentityUser user, CancellationToken cancellationToken) at Microsoft.AspNetCore.Identity.UserManager1.GetClaimsAsync(TUser user) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.GenerateClaimsAsync(TUser user) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory2.GenerateClaimsAsync(TUser user) at Microsoft.AspNetCore.Identity.UserClaimsPrincipalFactory1.CreateAsync(TUser user) at Volo.Abp.Identity.AbpUserClaimsPrincipalFactory.CreateAsync(IdentityUser user) at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo) at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()
at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation) at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed) at Volo.Abp.Identity.IdentitySecurityLogManager.SaveAsync(IdentitySecurityLogContext context) at Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnPostAsync(String action) at Volo.Abp.Account.Web.Pages.Account.OpenIddictSupportedLoginModel.OnPostAsync(String action)
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync()
at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.Rethrow(PageHandlerExecutedContext context) 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|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ExceptionContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

hi maliming,

I have added the user to the AbpUsers collection but I still can not login to the site

this is my code:

var connectionStringResolver = _serviceProvider.GetRequiredService<IConnectionStringResolver>();
        var dbContexts = GetAbpMongoDbContexts();
        var backOfficeDbContext = dbContexts.OfType<BackOfficeMongoDbContext>().FirstOrDefault();
        if (backOfficeDbContext is not null)
        {
            var database = await GetMongoDatabase(connectionStringResolver, backOfficeDbContext);
            var collection = database.GetCollection<BsonDocument>("AbpUsers");
            if (collection is not null)
            {
                var filterUser = Builders<BsonDocument>.Filter.Eq("UserName", "abc");
                var isExisted = await collection.Find(filterUser).AnyAsync();
                if (!isExisted)
                {
                    var user = new BsonDocument
                    {
                        { "_id", new BsonBinaryData(Guid.NewGuid(), GuidRepresentation.Standard) },
                        { "ConcurrencyStamp", Guid.NewGuid().ToString().Replace("-", "") },
                        { "CreationTime", DateTime.UtcNow },
                        { "IsDeleted", false },
                        { "UserName", "abc" },
                        { "NormalizedUserName", "ABC" },
                        { "Name", "abc" },
                        { "Email", "abc@abc.vn" },
                        { "NormalizedEmail", "ABC@ABC.VN" },
                        { "EmailConfirmed", true },
                        { "PasswordHash", _passwordHasher.HashPassword(null, "1q2w3E*") },
                        { "SecurityStamp", Guid.NewGuid().ToString().Replace("-", "") },
                        { "IsExternal", false },
                        { "PhoneNumber", "" },
                        { "PhoneNumberConfirmed", false },
                        { "TwoFactorEnabled", false },
                        { "LockoutEnabled", true },
                        { "AccessFailedCount", 0 },
                        { "IsActive", false },
                        { "ShouldChangePasswordOnNextLogin", false },
                        { "EntityVersion", 0 }
                    };
                    await collection.InsertOneAsync(user);
                }
            }
        }

It actually worked. Thanks very much!

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 have debugged the issue, and although it goes to the highlight, it still stores data in the audit table.

I have added [DisableAuditing] on controller, api and IgnoredUrls on AbpAspNetCoreAuditingOptions

Hmm, that's weird, it still isn't working.

For the route "/api/app/jobs/sync-robot-drivers"

I have setup like this but doesn't work

var ignoredUrls = new[]
            {
                "/jobs",
            };

foreach (var url in ignoredUrls)
{
    options.IgnoredUrls.AddIfNotContains(url);
}

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&lt;AbpAspNetCoreAuditingOptions&gt;(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:

Showing 41 to 50 of 77 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 05:21