Skip to content
No description, website, or topics provided.
C# HTML CSS JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Multi-tenant ASP.NET Core

This is demo project for my Multi-tenant ASP.NET Core presentation. It demonstrates multi-tenant solutions I have worked out for ASP.NET Core. I'm using the same demo also for presentations. Solutions provided here are not absolute truth. There are cases when something different is needed and then the code here serves as a good starting point.


There are multiple features and solutions demonstrated in demo application:

Setting every thing up

To demonstrate multi-tenant features I have built I'm using SQL Server LocalDB and MySQL databases. SQL Server LocalDB uses integrated security. For MySQL some user account is needed to access database. Those who plan to run this example on Linux must use some Linux version of SQL Server or SQL Server running on some other machine.

There are three tenants defined:

  • bigcorp - uses dedicated MySQL database
  • sme1 - uses shared SQL Server database
  • sme2 - uses shared SQL Server database

There are also some host name mappings needed to run this demo on local machine:

  • bigcorp
  • sme1
  • sme2

Web application uses port 5000 and it must be added to URL of all tenants:

When using public server to host this application make sure you turn on HTTPS in application startup.

You can’t perform that action at this time.