Last post Feb 17, 2010 12:04 PM by bigtrend
Feb 15, 2010 01:31 PM|virtualmax1|LINK
I am working on a project where I want to create the sub-domains for different modules. To better elaborate I want something like the below one:
http://parentwebsite.com - As a parent site and
http://wiki.parentwebsite.com - Sub-domain
http://community.parentwebsite.com - Sub-domain
The above ones are just the examples and hence I have used the duplicate names.
I want these as actual sub-domains mapped and not represented using the URL rewriting etc.
Considering .Net Framework 3.5, I am planning implement one of the below two options:
1. Create seperate website for parent domain and seperate websites for each sub-domain under a common solution sharing the same business logic layer. Then point these as a seperate websites as sub-domain in IIS. I know I will have to make some extra work
on session management across the sub-domains.
2. Create a Single website, but create different folders for intended modules under the same website and point those folder in IIS as a seperate sub-domain.
I would like which option will be a better one to use... In case if any body has some different idea, please comment.
Model View Presenter
asp.net 3.5 website
Feb 15, 2010 04:39 PM|bigtrend|LINK
I would suppose option number 2. is about Virtual Directories - and it is really feasiblle for your scenario.
Feb 15, 2010 08:50 PM|gunteman|LINK
Option 1 is the only possible solution (if you don't want to use URL Rewriting or redirection). Option 2 is not doable in IIS.
Feb 17, 2010 06:50 AM|bigtrend|LINK
Option 2 is not doable in IIS.
Why can't you setup several Virtual Directories as several different (separate) ASP.NET applications within the same single Web Site? Most of my PCs are configured this way.
Feb 17, 2010 08:18 AM|gunteman|LINK
The poster asked for specific subdomains, and in IIS specifying a domain for a folder is the same as setting up a (new) website, not a virtual directory.
It would be possible to add all the subdomains to the root website and use redirection or rewriting to e.g map wiki.parentwebsite.com to www.parentwebsite.com/wiki, but it seems the poster didn't want that.
Feb 17, 2010 10:52 AM|bigtrend|LINK
Sorry. The point 1. is indeed the only one available from Microsoft IIS server for these purposes:(
Feb 17, 2010 11:53 AM|gunteman|LINK
Nothing to be sorry about. It actually makes sense from a webserver's point of view (not only IIS).
I would strongly recommend the poster to use rewriting for this. It's easy and doesn't require special setup in the web server.
Feb 17, 2010 12:04 PM|bigtrend|LINK
From my experience it is often causing unstable behavior.