Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I wrote multi-tenant web application in MVC2. Adding / Removing an account is as complex as adding / removing a row in a table as I opted for shared database, shared schema approach.</p> <p>This is a very good article about multi-tenant database design from MSDN: <strong><a href="http://msdn.microsoft.com/en-us/library/aa479086.aspx" rel="nofollow">Multi-Tenant Data Architecture</a></strong></p> <p>All I had to do in MVC is to set up routing properly, so the first part of the path is account name:</p> <ul> <li>www.yourdomain.com/Account1/...</li> <li>www.yourdomain.com/Account2/...</li> <li>www.yourdomain.com/Account3/...</li> </ul> <p>and I have a custom MvcHandler for looking up account for each request:</p> <pre><code>public class AccountMvcHandler : MvcHandler { public AccountModel Account { get; set; } public AccountMvcHandler(RequestContext requestContext) : base(requestContext) { } protected override IAsyncResult BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, object state) { string accountName = this.RequestContext.RouteData.GetRequiredString("account"); Account = ServiceFactory.GetService&lt;IAccountService&gt;().GetAccount(accountName); // URL doesn't contain valid account name - redirect to login page with Account Name textbox if (Account == null) httpContext.Response.Redirect(FormsAuthentication.LoginUrl); return base.BeginProcessRequest(httpContext, callback, state); } } </code></pre> <p>As it was said by Andreas Paulsson the key phrase is "custom assemblies". Why do you need 'custom assemblies' for configuration? Are you using CodeEmit? Will users upload them? I would rather think about using <strong>Windows Workflow Foundation</strong> for any client-specific business logic customisation.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload