1

Is it possible to have a single solution with a main web project and have different projects set as sub-domains?

For instance, under one solution there would be:

  1. A data project
  2. The main "web" project - www.example.com
  3. Another web project - www.blog.example.com
  4. Another web - www.foobar.example.com

I've seen most posts related to this are about routing - but is there some built in way to accomplish this?

Cody
  • 8,686
  • 18
  • 71
  • 126
  • 3
    A Visual Studio Solution contains projects. It has nothing to do with where those projects are deployed. You could have web projects which could be deployed on any domain or subdomain you like. What exactly are you trying to achieve here? – Darin Dimitrov Mar 14 '13 at 07:57

2 Answers2

2

Solution is just a convenient way to organize groups of projects. Web projects act as different applications so I do not see why each projects should not work under separate (own) (sub)domains

Ramunas
  • 3,853
  • 1
  • 30
  • 31
0

You have to set 3 different web sites in IIS for each web project and to assign binding:

enter image description here

This way IIS knows to which website to route request based on subdomain name.

*On development machine you will need domain entries in your host file that point to localhost - 127.0.0.1.

Nenad
  • 24,809
  • 11
  • 75
  • 93