I have a .Net Web Site - actually Learning Management System that I would like users to enter via a prefix - e.g.,  Depending on how they come in, I would like to change the skin or theme of the website - something that I can readily do.  

What I am looking for is articles/best practices/suggestions on how to create the in .Net 4.0 and as part of my web site.

Any help greatly appreciated.
Who is Participating?
The issue is in fact more about DNS than IIS. Do you have access to manipulating your DNS records for the site? To setup what you want, you would need to setup a wildcard DNS entry pointing to your website ip address.
* IN A

Open in new window

How you accomplish the DNS configuration will depend on who handles your DNS. If your DNS provider does not provide wildcard DNS entries you’ll want to find one who does.

Once you've done this, you can then use IIS Url Rewriting Rules to "rewrite" requests for to So creating a subdomain becomes similar to simply creating a subfolder in your website and putting any necessary files into that subfolder. Alternatively, you could even rewrite that url out as "". Or even further virtualising that whole infrastructure as necessary. Just anything that suits your application model.

These articles may help:
Bob LearnedCommented:
One approach is to use themes, and CSS style pages, and set the Page.Theme in the Page_PreInit.

How to: Apply ASP.NET Themes Programmatically

If you have master pages, then you can centralize this approach.

You may have to try url rewriting.. in there loads of same of that on net//
RBSAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.