Base solution for your next web application
Open Closed

How can I bind different TENANTS to different path? #3803


User avatar
0
zepan created

I have two TENANTS (A,B), I want bind A to <a class="postlink" href="http://www.contoso.com/A,and">http://www.contoso.com/A,and</a> bind B to <a class="postlink" href="http://www.contoso.com/B.Thanks">http://www.contoso.com/B.Thanks</a>.


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

    Hi @zepan,

    We actually don't suggest this approach, instead we suggest subdomain for each tenant. Because in this approach cookies became a problem.

    Anyway, ABP framework handles this if you set your website url to <a class="postlink" href="http://www.contoso.com/">http://www.contoso.com/</a>{TENANCY_NAME}.

    Thanks.

  • User Avatar
    0
    zepan created

    Thanks for you Reply,

    I config web.config <add key="WebSiteRootAddress" value="http://localhost:9901/{TENANCY_NAME}" /> It doesn't work(Visited <a class="postlink" href="http://localhost:9901/demo">http://localhost:9901/demo</a>, get Error 404).

    The asp.net zero vision: 4.3 asp.net 5.x & angular 1.x.

    Thanks.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @zepan,

    It is because MVC considers "demo" as a controller. You also need to configure MVC routing to handle this scenario. First paremter will not be used by mvc in your case, second parameter will be the controller name.

    For example: <a class="postlink" href="http://localhost:9901/">http://localhost:9901/</a>{TENANCY_NAME}/Controller/Action