|
|
Question : Creating sub-domains on the fly from a C# Windows application.
|
|
Hi,
I own a domain www.xyz.com. The domain is configured to point to my server machine with ip xxx.xxx.xxx.xxx. My server has Internet Information Server IIS running on Windows XP Professional. The default website for my server opens up when you visit http://www.xyz.com/.
I need to now create sub-domains through an application that is constantly running in the background. It is written in C#, and everyday at a certian time, it should create one sub-domain, the name for which will be dynamically fetched from a database. So every day, I would have an additional sub-domain such as http://news.xyz.com, http://music.xyz.com, http://weather.xyz.com, etc.
Could somebody please guide me as to how I can achieve this using a C# application that I have already written. Please note that I need the process to be completed programatically without any manual steps.
Thanks,
Khan
|
Answer : Creating sub-domains on the fly from a C# Windows application.
|
|
Hi,
sure you can - just add the domain to the hosts file on the computer you access the site from.
for example, on the server console, do start->run->"notepad.exe %systemroot%\system32\drivers\etc\hosts"
then at the bottom of the file, add:
127.0.0.1 subdomains.localhost 127.0.0.1 subdomain2.localhost
etc.
from a remote computer, just enter the ip address of the server to access the same way.
cheers!
|
|
|
|
|