Asignación de la aplicación mvc a subdominios mediante IIS 7.5

I am not sure the best way to architect my IIS environment and MVC4 applications.

I have my standard marketing site on . This is an mvc4 site.

I have created a 2nd mvc4 application that I want users to be able to access via

I dont want to have to hardcode any subdomains as I need this to be as flexible as possible.

Can anyone suggest what I should be doing?

preguntado el 10 de marzo de 12 a las 06:03

i think you are looking for multitenancy -

1 Respuestas

You are looking for a multitenant application, varied on the subdomain.

You can simply pull the correct record from a data source of sorts based on the current subdomain.

Also, for ease of routing and building links, I'd recommend building a new RouteBase subclassed type, that once initialized with the route, would have the subdomain and the referenced client Identifier as a route parameter in the RouteData.Values collection.

This article talks about subclassing RouteBase for a subdomain: ¿Cómo hacer cuentas al estilo Basecamp en Asp.Net Mvc?

This post has a wealth of links regarding multitenancy: ¿Qué se debe tener en cuenta al desarrollar una aplicación MVC de multiinquilino?

contestado el 23 de mayo de 17 a las 12:05

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.