Activities of "christophe.baille"

Thanks, it works well now

Thanks for the quick reply.

So there is no way to change the tenant if it is auto selected by the domain? Can not change priority or anything?

I wanted to let the user change it, specially in case the tenant with a given domain do not exists. I changed the TenantResolver.ResolveTenantIdOrNameAsync method to not throw an error, then I wanted let them select another one

  • ABP Framework version: v4.3.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

I added the follwing line on my **HttpApiHostModule class:

options.AddDomainTenantResolver("https://{0}:44348");

I then edited Default.cshtml file about keep seing the switch tenant box.

When I run my solution in local and go to my login page, I have the tenant localhost preseleted which is good.

My issue here is that if I try to change the tenant, once I click save, nothing happens, it keep localhost tenant. It goes through the method as I have the message "Given tenant is not available:..."

I added this lines in **HttpApiHostModule file but it remain the same

            options.TenantResolvers.Add(new QueryStringTenantResolveContributor());
            options.TenantResolvers.Add(new RouteTenantResolveContributor());
            options.TenantResolvers.Add(new HeaderTenantResolveContributor());
            options.TenantResolvers.Add(new CookieTenantResolveContributor());           

Is AddDomainTenantResolver supposed to change the behave of tenant resolve and not let use cookies anymore?

Hello,

Thanks it works well, I was worrying about having to add so much Frameworksource on my solution.

About the source code, I do not think I took the wrong Framework source, but I need to remove some code from the original method as IsActive does not exist

On last point that you might be able to tell me if possible or not. I wanted to edit the footer of the MVC view from Lepton Theme, so I did add the whole module Volo.Abp.AspNetCore.Mvc.UI.Theme.Lepton in my solution just to edit one file...

I did follow this:

https://docs.abp.io/en/abp/latest/UI/AspNetCore/Customization-User-Interface#overriding-a-razor-page-cshtml

I did it already to change the register page, but it seems not working for my Lepton Theme. See as below, on the left it is the solution as added, you can see the path of the file. On the right, Register.cshtml replace the original one. I created a folder path for my footer, but it does not take it, I should but this _Footer.cshtml in another folder or it is just not possible to replace like this?

From the log file, it seems there is an issue of mapping with IsActive. I am a bit confused to have this error when using code from project and not from the Package as both have same version...

2021-07-13 19:27:04.505 +07:00 [FTL] Application startup exception Volo.Abp.AbpInitializationException: An error occurred during the initialize Volo.Abp.Modularity.OnApplicationInitializationModuleLifecycleContributor phase of the module Kwork.StaffApp.StaffAppHttpApiHostModule, Kwork.StaffApp.HttpApi.Host, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null: An exception was thrown while activating Volo.Abp.IdentityServer.Grants.PersistedGrantStore -> Volo.Abp.ObjectMapping.DefaultObjectMapper1[[Volo.Abp.IdentityServer.AbpIdentityServerDomainModule, Volo.Abp.IdentityServer.Domain, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null]] -> Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider1[[Volo.Abp.IdentityServer.AbpIdentityServerDomainModule, Volo.Abp.IdentityServer.Domain, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null]] -> λ:Volo.Abp.AutoMapper.IMapperAccessor -> λ:Volo.Abp.AutoMapper.MapperAccessor.. See the inner exception for details. ---> Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.Abp.IdentityServer.Grants.PersistedGrantStore -> Volo.Abp.ObjectMapping.DefaultObjectMapper1[[Volo.Abp.IdentityServer.AbpIdentityServerDomainModule, Volo.Abp.IdentityServer.Domain, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null]] -> Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider1[[Volo.Abp.IdentityServer.AbpIdentityServerDomainModule, Volo.Abp.IdentityServer.Domain, Version=4.3.2.0, Culture=neutral, PublicKeyToken=null]] -> λ:Volo.Abp.AutoMapper.IMapperAccessor -> λ:Volo.Abp.AutoMapper.MapperAccessor. ---> AutoMapper.AutoMapperConfigurationException: Unmapped members were found. Review the types and members below. Add a custom mapping expression, ignore, add a custom resolver, or modify the source/destination type For no matching constructor, add a no-arg ctor, add optional arguments, or map all of the constructor parameters

Tenant -> TenantConfiguration (Destination member list) Volo.Saas.Tenants.Tenant -> Volo.Abp.MultiTenancy.TenantConfiguration (Destination member list)

Unmapped properties: IsActive

at Volo.Abp.AutoMapper.AbpAutoMapperModule.<>c__DisplayClass2_1.<CreateMappings>g__ValidateAll|2(IConfigurationProvider config) at Volo.Abp.AutoMapper.AbpAutoMapperModule.CreateMappings(IServiceProvider serviceProvider) at Autofac.Extensions.DependencyInjection.AutofacRegistration.<>c__DisplayClass3_0.<Register>b__0(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Activators.Delegate.DelegateActivator.ActivateInstance(IComponentContext context, IEnumerable1 parameters) at Autofac.Core.Activators.Delegate.DelegateActivator.<ConfigurePipeline>b__2_0(ResolveRequestContext ctxt, Action1 next) at Autofac.Core.Resolving.Middleware.DelegateMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.DisposalTrackingMiddleware.Execute(ResolveRequestContext context, Action1 next) at Autofac.Core.Resolving.Pipeline.ResolvePipelineBuilder.<>c__DisplayClass14_0.<BuildPipeline>b__1(ResolveRequestContext ctxt) at Autofac.Core.Resolving.Middleware.ActivatorErrorHandlingMiddleware.Execute(ResolveRequestContext context, Action1 next) --- End of inner exception stack trace ---

It still doesn't work. I will explain what I want to do an how I proceed:

I want to edit the method Volo.Abp.MultiTenancy.TenantConfigurationProvider.GetAsync(bool saveResolveResult) as it return an error in case DomainTenantResolver do not find a tenant. I want to make the tenant choice visible if so

To add Volo.Abp.MultiTenancy project on my solution, I need first to add Volo.Abp.AspNetCore.MultiTenancy source on HttpApi.Host project.

After that, it keep running well, the solution is fine.

The next step is to add Volo.Abp.MultiTenancy source code as it is on it I want to edit my method, so I replace 1 by 2

I then replaced reference from project to the one from packages (I did the same for Volo.Abp.AspNetCore.MultiTenancy too:

But then I got this errors.

In case it can be usefull, the difference between this projects is that Volo.Abp.AspNetCore.MultiTenancy is Microsoft.NET.Sdk.Web (net5.0) and Volo.Abp.MultiTenancy is Microsoft.NET.Sdk (netstandard2.0)

  • ABP Framework version: v4.3.2

  • UI type: Angular

  • DB provider: EF Core

  • Tiered (MVC) or Identity Server Separated (Angular): no

  • Steps to reproduce the issue:"

When I login as host admin and go to Language management/Language texts, I have the button edit which allow me to change the value of the text.

However, when I login as tenant admin, I do not have this button anymore, so I can not edit the text for my tenant:

Is it normal? I did check on my tenant features and do not have option to enable/disable it

What makes me think there is a bug is:

There is a permission for the admin user about "Edit Language Text" and it is checked:

Plus when I open the table I see a field TenantId, which means we should be able to write on this table depending on then tenant:

Thank you

Great thanks

Sorry for the late reply.

Does it means that I need to add the whole framework to my source code? I can not add only Volo.Abp.MultiTenancy?

I built the project added successfully by right click as you can see:

HI,

You are right, It's a problem with the pro template.

for now, try put the Register.cshtml file in the Pages\Account folder of your .HttpApi.Host

Register.cshtml:

@page 
@using Microsoft.AspNetCore.Mvc.Localization 
@using Volo.Abp.Account.Localization 
@using Volo.Abp.Account.Public.Web.Security.Recaptcha 
@using Volo.Abp.Account.Security.Recaptcha 
@using Volo.Abp.Account.Settings 
@using Volo.Abp.Settings 
@model Volo.Abp.Account.Public.Web.Pages.Account.RegisterModel 
@inject IHtmlLocalizer<AccountResource> L 
@inject Volo.Abp.AspNetCore.Mvc.UI.Layout.IPageLayout PageLayout 
@inject ISettingProvider SettingProvider 
@{ 
    PageLayout.Content.Title = L["Register"].Value; 
    var reCaptchaVersion = await SettingProvider.GetAsync<int>(AccountSettingNames.Captcha.Version); 
} 
 
@section scripts 
{ 
    @if (Model.UseCaptcha) 
    { 
        if (reCaptchaVersion == 3) 
        { 
            <recaptcha-script-v3/> 
            <recaptcha-script-v3-js action="register" callback="(function(){$('#@RecaptchaValidatorBase.RecaptchaResponseKey').val(token)})"/> 
        } 
        else 
        { 
            <recaptcha-script-v2/> 
        } 
    } 
} 
 
<div class="account-module-form"> 
    <form method="post"> 
 
        @if (Model.UseCaptcha) 
        { 
            <input type="hidden" name="@RecaptchaValidatorBase.RecaptchaResponseKey" id="@RecaptchaValidatorBase.RecaptchaResponseKey"/> 
        } 
 
        @if (!Model.IsExternalLogin) 
        { 
            <abp-input asp-for="Input.UserName" auto-focus="true"/> 
        } 
 
        <abp-input asp-for="Input.EmailAddress"/> 
 
        @if (!Model.IsExternalLogin) 
        { 
            <abp-input asp-for="Input.Password"/> 
        } 
 
        @if (reCaptchaVersion == 2) 
        { 
            <recaptcha-div-v2 callback="(function(){$('#@RecaptchaValidatorBase.RecaptchaResponseKey').val(token)})" /> 
        } 
 
        <abp-button button-type="Primary" size="Block" type="submit" class="mt-2 mb-3">@L["Register"]</abp-button> 
        @L["AlreadyRegistered"] <a href="@Url.Page("./Login", new {returnUrl = Model.ReturnUrl, returnUrlHash = Model.ReturnUrlHash})">@L["Login"]</a> 
    </form> 
</div> 
 

Sorry to ask as it have been a while now. Does the issue have been fixed on the pro template now?

Showing 131 to 140 of 188 entries
Made with ❤️ on ABP v9.0.0-preview Updated on September 20, 2024, 05:21