I would like to ask on how to create a subdomain application in asp.net mvc?
Here is my scenario, i have 1 domain www.maindomain.com. Users can signup in my website and can create their personal website, like: www.john.maindomain.com.
Here are the things that i know for now:
- You should create a custom route in mvc to handle the subdomain.
- In development environment, you need to configure HOST file and in production environment you can setup a wildcard in DNS for subdomain.
Now, what i am missing is how will i generate the content of the site dynamically based on the users profile personal website? (The user can only select predefined layout)
Should i create a master page template .cshtml file? Then add contents in a contentplaceholder section. or should i create the content on the fly and save it to local disk?
What is the better approach?