title: Identify tenant from the url in multi-tenant asp.net mvc application
body: <p>I am creating a multi-tenant asp.net application. I want my url to follow</p>
  
  <pre><code>**http://www.example.com/test1/test2/**{tenantName}/{controller}/{action}
  **http://www.example.com/test1/**{tenantName}/{controller}/{action}
  **http://www.example.com/**{tenantName}/{controller}/{action}
  </code></pre>
  
  <p>Here the part of the url in bold is fixed (will not change)
  {tenantName}=will be logical tenant instance.</p>
  
  <p>I have followed <a href="http://lonetechie.com/2012/09/25/multi-tenant-architecture-with-asp-net-mvc-4/" rel="nofollow">this</a> link
  What will be the routing to handle this?</p>