ASP.NET multi-Tenant Application

前端 未结 4 888
轻奢々
轻奢々 2021-02-04 19:15

I have an Asp.net application 3.5. I want to be able to allow multiple/ different clients to access the same application but using different URL\'s. I have already managed to co

4条回答
  •  名媛妹妹
    2021-02-04 19:46

    I think the way to do this is to make the website the default website on the server i.e. configure so all requests to the servers IP hit this website (unless the header matches another website that explicitly looks for it). You do this just by not specifying a header on the IIS settings (only an IP address and a port number) - you can only do this for one site per IP address/port combination on the server.

    Then look at the request url in the website to determine which domain was requested.

    This way there is no need to 'create' subdomains... but you do need to reject all request to a domain that you don't want to recognize.

    If you can't do this then you would need to adjust the IIS metabase from the application - not impossible - but a very risky and probably a bad idea.

提交回复
热议问题