locked
Hosting multiple MVC app versions on IIS RRS feed

  • Question

  • User-1450796031 posted

    I've got a multi tenant asp.net mvc app hosted on iis 8. Each tenant has it's own database, an there is one database with tenants metadata like name, database-name...

    As ORM i use Entity Framework with Code-First Migrations.

    Now I've got a problem when update the application. because when i start the migration, the App is offline for all tenant because, entity framework can't connect to database with different migration version.

    When all Databases are migrated i can start the IIS-Website and all Tenants come online again!

    Is there a way to achieve such database migration? OR Am I able to host multiple versions of an MVC App on same Domain (perhaps routing per e.g. http-Header or meta Database)?

    Monday, June 6, 2016 6:50 AM

Answers

  • User-821857111 posted

    Each tenant has it's own database
    That's not really a multi-tenant app. In a true multi-tenant application, all tenants would use the same database which will alleviate the update problem you encounter, because there would only be one database to update.
    Am I able to host multiple versions of an MVC App on same Domain
    It depends on what you mean, but most likely not.  You can however host an instance of an app per subdomain, but that moves you even further away from multi-tenancy.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, June 6, 2016 7:08 AM