Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
how we can implement as mentioned below with aspnetzero to improve startup performance https://www.fusonic.net/developers/2014/07/09/3-steps-for-fast-entity-framework-6-1-code-first-startup-performance/
Hi, Please check when i trying to create new tenant and after that i assign feature or change feature then i checked in admin role permission popup, the permission tree is not properly ticked. check in image.
Please download code AppAuthorizationProvider file and total process in video from http://103.89.253.21:420/PermissionIssue.rar
Hi,
We are using following controller and while hitting register function from Postman it is working totally fine on local as well on IIS hosted application and user is created for the tenant But in case we hit the same from IIS hosted application hit from shopify webhook it gives error
I have shared the details on email with all the request response and code attached
Regards, Harshit
Hi, My requirement is to register a client with specific tenant without login with any user. I have changed my code as following:
still getting error (A task was canceled) in _userRegistrationManager.RegisterAsync (code is same as default)
using (_unitOfWorkManager.Current.SetTenantId(2033)) { using (var unitOfWork = _unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew)) {
Logger.Info("1. Shopify EmailAddress : "+ order.Customer.Email);
using (_iSession.Use(2033, null))
{
//var param1 = new ImpersonateInput();
//param1.TenantId = 2033;
//param1.UserId = 32878;
//await AutoLoginClient(param1);
RegisterViewModel model = new RegisterViewModel();
model.Name = order.Customer.FirstName;
model.Surname = order.Customer.LastName;
model.EmailAddress = order.Customer.Email;
model.Password = "123456";//await _userManager.CreateRandomPassword();
model.UserName = model.EmailAddress;
try
{
Logger.Info("2. Shopify EmailAddress : " + order.Customer.Email);
var user = await _userRegistrationManager.RegisterAsync(
model.Name,
model.Surname,
model.EmailAddress,
model.UserName,
model.Password,
true,
_appUrlService.CreateEmailActivationUrlFormat(AbpSession.TenantId),
true
);
Logger.Info("3.1 Shopify EmailAddress : " + order.Customer.Email);
await CurrentUnitOfWork.SaveChangesAsync(); //To get new user's Id.
Logger.Info("3.1 Shopify EmailAddress : user.id : " + user.Id);
}
catch (Exception e)
{
Logger.Info(" Shopify Exception Message: " + e.Message);
Logger.Info(" Shopify Exception InnerException: " + e.InnerException);
}
if (unitOfWork != null)
unitOfWork.Complete();
}
}
}
this following line giving error in this function RegisterAsync - and error is A task was canceled.
Location : CDP.Core\Authorization\Users\UserRegistrationManager.cs:
This issue occurring while we are creating user by api and setting manuallly tenantid in abp session. But Its working fine on web.
Here is error log
A task was canceled.
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func
4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable
1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable1 asyncEnumerable, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleOrDefaultAsync[TSource](IAsyncEnumerable
1 asyncEnumerable, CancellationToken cancellationToken)
at Abp.EntityFrameworkCore.Repositories.EfCoreRepositoryBase3.FirstOrDefaultAsync(Expression
1 predicate)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Microsoft.AspNetCore.Identity.UserManager1.FindByNameAsync(String userName) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Abp.Authorization.Users.AbpUserManager
2.CheckDuplicateUsernameOrEmailAddressAsync(Nullable1 expectedUserId, String userName, String emailAddress) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at Abp.Authorization.Users.AbpUserManager
2.CreateAsync(TUser user)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Microsoft.AspNetCore.Identity.UserManager1.CreateAsync(TUser user, String password) at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation) at CDP.Authorization.Users.UserRegistrationManager.RegisterAsync(String name, String surname, String emailAddress, String userName, String plainPassword, Boolean isEmailConfirmed, String emailActivationLink, Boolean IsCustomerRole, Nullable
1 tenantID) in D:\Projects\SprngNew\branches\dev\src\CDP.Core\Authorization\Users\UserRegistrationManager.cs:line 109
at CDP.Authorization.Accounts.AccountAppService.RegisterAPI(RegisterInput input) in D:\Projects\SprngNew\branches\dev\src\CDP.Application\Authorization\Accounts\AccountAppService.cs:line 571
at Abp.Authorization.AuthorizationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Auditing.AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Auditing.AuditingInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at Abp.Runtime.Validation.Interception.ValidationInterceptor.InternalInterceptAsynchronous[TResult](IInvocation invocation)
at CDP.Stripe.ShopifyAppService.CreateAsync(Order order, CancellationToken cancellationToken) in D:\Projects\SprngNew\branches\dev\src\CDP.Application\Shopify\ShopifyAppService.cs:line 232
at Abp.Domain.Uow.UnitOfWorkInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at Abp.Auditing.AuditingInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at Abp.Runtime.Validation.Interception.ValidationInterceptor.InternalInterceptAsynchronous(IInvocation invocation)
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.
For more refference in code
using (var unitOfWork = _unitOfWorkManager.Begin(TransactionScopeOption.RequiresNew))
{
using (_unitOfWorkManager.Current.SetTenantId(inputOrder.TenantID))
{
using (_iSession.Use(inputOrder.TenantID, inputOrder.AdminUserId))
{
var id = AbpSession.TenantId;
model.TenantId = inputOrder.TenantID;
model.Password = "123456";
UserID =await _accountAppService.RegisterAPI(model);
unitOfWork.Complete();
}
}
}
We setting tenantid manually and RegisterAsync function is calling in _accountAppService.RegisterAPI service. RegisterAPI code in bellow
public async Task<long> RegisterAPI(RegisterInput input)
{
//if (UseCaptchaOnRegistration())
//{
// await RecaptchaValidator.ValidateAsync(input.CaptchaResponse);
//}
if (AbpSession != null) input.TenantId = AbpSession.TenantId;
var user = await _userRegistrationManager.RegisterAsync(
input.Name,
input.Surname,
input.EmailAddress,
input.UserName,
input.Password,
true,
AppUrlService.CreateEmailActivationUrlFormat(input.TenantId),
true,
input.TenantId
);
CreateOrEditUserDetailDto userdetail = new CreateOrEditUserDetailDto();
userdetail.UserID = user.Id;
userdetail.FirstName = input.Name;
userdetail.LastName = input.Surname;
userdetail.CountryID = null;
userdetail.TimeZoneName = "";
userdetail.IsTenant = false;
userdetail.City = "";
userdetail.StateID = null;
userdetail.Phone = "";
userdetail.ImageDataID = null;
userdetail.CoachCategoryMap = new CreateOrEditCoachCategoryMappingDto();
userdetail.TenantPurposeMap = new CreateOrEditTenantPurposeMappingDto();
userdetail.TimeZoneName = await _userDetailsAppService.GetTenantTimeZone(Convert.ToInt32(AbpSession.TenantId));
await _userDetailsAppService.CreateOrEdit(userdetail);
//Getting tenant-specific settings
var isEmailConfirmationRequiredForLogin = await SettingManager.GetSettingValueAsync<bool>(AbpZeroSettingNames.UserManagement.IsEmailConfirmationRequiredForLogin);
return user.Id;
}
Hi, I want to create filter for each widget individually, not globel filter. Is any setting available to manage filter in this way?? For more clearity , If i create 5 widget on dashboad then i need 5 separate filter for each widget.
On vs after all the projects are build complete for debugging the web.mvc project it takes too much time in reaching login page
Please help
Regards, Harshit
Prerequisites
What is your product version?
v8.1
What is your product type (Angular or MVC)?
MVC
What is product framework type (.net framework or .net core)?
.net core
I am not able to fatch correct date format. i am getting date from MVC controller and binding in HTML page this showing wrongly this look in below image. moment js can not be use in MVC controller.
I created new language English(India) en-IN. For this case i am facing this issue.
I already shared source code on your [email protected]. On 31-08-2021 Please check the same as soon as prosible
Thanks!
Please answer the following questions before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.
We have observed ABPService proxies/getall is taking time please find the screenshot attached. Is there a way to cache it?
Have you checked the code? We are still stuck on this issue. Please check asap.
Thanks!