Multiple MVC 4 Applications with separate subdomains

Discussion in 'ASP.NET / ASP.NET Core' started by codemonkey, Mar 8, 2012.

  1. I've searched high and low for an answer and wasn't sure if this forum or someplace like Stackoverflow would be best, but at least here the Discountasp staff can chime in.

    So I'm playing with MVC 4 beta. I'm fairly new to MVC, but seem to have grasped the hang of it over the last few months. I'm working on a complex site with many features. I haven't activated subdomains on my Discountasp.net account yet, waiting to see if this is the right answer.

    All these apps use one central database.

    Planned / Desired Architecture:

    www.mysite.com (root - MVC4 app) for any regular web user

    business.mysite.com (root/business - MVC4 app) for my businesses to manager their profiles that users look at. Requires its own custom membership, global.asax, etc.

    api.mysite.com (root/api - MVC4 Web API app) for native mobile apps

    mobile.mysite.com (root/mobile - MVC4 Single Page jQuery Mobile app) for mobile web

    blog.mysite.com (root/blog - Wordpress blog app)

    There actually could be 1 more full application down the road that uses a subdomain, but I'll cross that bridge later.

    So after trying to install a web application to the api folder just to play with it (again I still haven't enabled the subdomains) and went directly to www.mysite.com/api/, MVC threw a fit regarding routing rules and couldn't find the appropriate controller. I kind of expected that, but whatever.

    So my question is:
    Can this be done on Discountasp.net under one hosting account? I know MVC is picky about URL routing. I've seen other responses about multi-tenant applications, but these are really separate MVC apps. Also seen solutions suggesting MVC areas, I tried that and it didn't work. An area has to share the root global.asax and I need a separate one for my businesses app.

    I also don't mind using the same application pool for all the apps because if one part of the site needs to come down for maintenance, they all will need to, but if Discountasp can have multiple hosting accounts to the same domain / subdomains, like shown above, as the complete solution, I can do that too.

    Thanks!
     
  2. I'd like to know the answer too? I was sent here by the support line as well... I see they're real responsive here!!! NOT... a little help guys?!
     
  3. mjp

    mjp

    Just to clarify; posting a question here in the forum doesn't necessarily mean you're going to get a response from someone on the DiscountASP.NET staff. A lot of the time you will, but it's a user community forum, not a support channel.
     

Share This Page