antosubash / blog-comments

MIT License
0 stars 0 forks source link

posts/abp-extend-tenant-with-custom-host #13

Open utterances-bot opened 2 years ago

utterances-bot commented 2 years ago

Extend Tenant management and add custom host to your ABP App. Part 7

In this post we will see how to extent the tenant entity and Add a custom tenant resolver for your ABP app.

https://blog.antosubash.com/posts/abp-extend-tenant-with-custom-host

talal3000 commented 2 years ago

Hi; is this still working? I used the steps provided on an MVC-Teired new solution. I keep getting: The requested service 'TestProj.TenantManagement.ICustomTenantRepository' 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.

antosubash commented 2 years ago

@talal3000 MVC-Tiered Web Project does not have access to the DB. The sample is made with the Default app and It will work with the default app. If you want it to work with the tiered app, you have to make the changes in the web project. You have to add ef core project as a reference and provide a connection string in the app settings.

talal3000 commented 2 years ago

@antosubash may i ask which changes to make to the web project? I made all the changes in the proper layers as per your walkthrough until: "Configure the AbpTenantResolveOptions in the Web project at ConfigureServices method" and after, which i made in the web project.

Thank you in advance for your help.

Very nice article btw and i am hoping it works because it is more practical for tenants to use their own domains

antosubash commented 2 years ago

@talal3000 Add EF Core Project to the web project and update the dependency in the web module. Update the app settings with the connection string to the db.

wenceslaoleon commented 1 year ago

@antosubash Can you update this project to abp 7.0P please.

effapp commented 1 year ago

Hi: Can you update the project to angular, please ?

amitatnxbre commented 1 year ago

Hi, First of all its nice tutorial. I am following this and trying to create my own project. Now here everything you have described has been followed. However the following are not working:

  1. if I provide test1.local on the address bar, it is showing the landing page. Post clicking login button its redirecting to - https://localhost:44318/connect/authorize?client_id=PMS_Web&redirect_uri=https%3A%2F%2Ftest1.local%3A44381%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20roles%20email%20phone%20PMS&response_mode=form_post&nonce=638244134130400208.MWJiMWE3MjgtNTkzMy00NGE3LThhM2EtNzViMzkwZDNlYWIzNmExMzQ1MGItNWM1Zi00ZWJkLWJmY2UtNDQ4NzkzMTYwZWJi&state=CfDJ8A-8dJyVYUFPoJv7D2W7mDVpoHSEAAGZtFQuN6LBjzwvdhLsT834aIIClYMjI2ocUsoHKhSU_mku0klI7rzcHzfwbgM7UwnSEDTkMDxQ-Y7RKMFbDSPkgE_VxRmdtaSKgnwrlNF8lBgY_04ksKoGXm1fp0Dg_skhr9o7dYY7wR-MVO96RCIrRKSPc5wKehH3eXwB3pk04z0sxUtMKCl8lkg2C21WNX8plQKwAQmiQTE8MkMBPhatogZPlQq2uGGjj8hR0BzIq6S2uKTb6F6X3_wlJwd3G2V6tvqGA9BAeGCE&x-client-SKU=ID_NET6_0&x-client-ver=6.15.1.0

and showing - error:invalid_request error_description:The specified 'redirect_uri' is not valid for this client application. error_uri:https://documentation.openiddict.com/errors/ID2043

  1. another question is - I want to create database per tenant. But I cannot see the connection string input text box on the tenant creation window. Please let me know how to achieve this.

Thanks

mrnaddu commented 9 months ago

Hey anyone have idea ? How can i achieve this in microservice? It is throwing connection string error i added the connection string of tenant service in authserver (mvc) followed everything as the article. Its working fine with monolithic but facing connection string error in microservice. @antosubash HELP . THANK YOU

ahmedFathyelshal commented 5 months ago

Hi All I have follow the steps and write everything in its layer but i always get this error when i try to get data by the custom attribute

Translation of 'EF.Property(EntityShaperExpression: Volo.Abp.TenantManagement.Tenant ValueBufferExpression: ProjectionBindingExpression: EmptyProjectionMember IsNullable: False , "Code")' failed. Either the query source is not an entity type, or the specified property does not exist on the entity type.

How can i solve this issue Thanks