0

I asked this question (Mapping mvc application to subdomains using IIS 7.5) over on stackoverflow and Amritpal mentioned I should be looking at multi tenancy.

How do I set my 2 applications up to run this?

I have 2 mvc4 applications on the same server running IIS 7.5

Application 1 is the marketing site Application 2 is the business site that I need to be able to configure a wildcard dns allow me to point to something like

www.company1.mydomain.com
www. company2.mydomain.com
etc

I dont want to have to hardcode anything into IIS for each of the hostheaders as I dont want to have to update IIS everytime I get a new customer.

Any suggestions/tips/answers would be really appreciated.

Diver Dan
  • 101

2 Answers2

0

If no SSL is required, I would just add a 2nd IP to host, and create a IIS Web App for each MVC4 app and bind each Web App on it's own IP. Then no host headers are required and you can point your wildcard DNS to the respective IP for each app.

Bret Fisher
  • 3,973
  • 2
  • 21
  • 25
0

To get IIS to respond using the same app pool/website, you should set it up with a blank hostname in IIS Manager.

Once you do this, I would guess you need to do the rest in MVC

Thor Erik
  • 300
  • 1
  • 11