Base solution for your next web application
Open Closed

I couldn't run it with a Multitenant Subdomain #10052


User avatar
0
QuickApp created
  • What is your product version? v10.1.0
  • What is your product type (Angular or MVC)? Angular
  • What is product framework type (.net framework or .net core)? .net core

If issue related with ABP Framework

  • What is ABP Framework version? v10.1.0

Hi everyone, I am trying to login multitenant using subdomain. But when it tries to login (https://ExampleTenancyName.localhost:44301), it gives an "Invalid user name or password" error. I think tenant id value is not gone.

The changes I made to the code are as follows:

Demo.Web.Host / appsettings.json: "App": { "ServerRootAddress": "https://{TENANCY_NAME}.localhost:44301/", "ClientRootAddress": "http://{TENANCY_NAME}.localhost:4200/", "CorsOrigins": "http://*.mycompany.com,http://*.localhost:4200,http://localhost:9876", "SwaggerEndPoint": "/swagger/v1/swagger.json", "AllowAnonymousSignalRConnection": "true" },

Angular / appconfig.json: "remoteServiceBaseUrl": "https://localhost:44301", "appBaseUrl": "http://{TENANCY_NAME}.localhost:4200",

Angular / angular.json: "serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "abp-zero-template:build", "disableHostCheck": true },


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @QuickApp

    Did you try this on localhost ? If not, it will not work becasue you can't use subodmains on localhost. If you want to try this on localhost, you can follow such an approach.

    1. Modify Windows host file to redirect a website (for example myzerodevapp.com) to 127.0.0.1. Also, do it for a few subdomains you want to try.
    2. Then, configure this website in the appsettings.json of the server side app and appconfig.json of the Angular app.
    3. After all, you can access, for example, default. https://myzerodevapp.com:44301 on your localhost.

    Don't forget to undo the changes you will do in Windows host file after testing this. But, it is better to test this on a real domain and subdomain.