Print Page | Close Window

Add a subdomain from ASP or ASP.NET

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: General Discussion
Forum Description: General discussion and chat on any topic.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16429
Printed Date: 31 March 2026 at 1:17pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Add a subdomain from ASP or ASP.NET
Posted By: theSCIENTIST
Subject: Add a subdomain from ASP or ASP.NET
Date Posted: 04 September 2005 at 1:33pm
I want to add a subdomain (john.mydomain.com) like that, when someone registers to one of my services, I run a DNS server, and I'm wondering what is needed to do this from ASP, or ASP.NET.

I can do it manually on the DNS and IIS server, but it would be great if this could be done programatically, therefor automating the system.

Each subdomain would be served from a different directory with the same name, created at the time of registration.

I would prefer doing it with ASP, but if it can only be done from .NET, then so be it.

Anyone?

-------------
:: http://www.mylittlehost.com/ - www.mylittlehost.com



Replies:
Posted By: Bluefrog
Date Posted: 04 September 2005 at 5:37pm
I'm not sure how you'd do that, but my gut reaction is that you'll need a COM object in ASP to do the real work. As for .NET, not sure, but if it can be done, then you should be able to do it in .NET without COM.

Then again, I'm just shooting in the dark.

I'd look into how you can interact with the DNS service through .Net for an answer - as well as IIS where you'd create a new site automatically.

Search engine spammers do a lot of this type of thing on Apache and PHP, but I don't know what tools they use other than the httpd Apache file.

I hope that kindof helps...



-------------
http://renegademinds.com/" rel="nofollow - Renegade Minds - Guitar Software http://renegademinds.com/Default.aspx?tabid=65" rel="nofollow - Slow Down Music


Posted By: Mart
Date Posted: 04 September 2005 at 5:45pm
To create a new IIS site you can use WMI (Windows Management Intrumentation) with .NET. You can also access WMI using ASP/COM using WScript I think.

Here's how to do it in C#, the basics should be the same in ASP http://weblogs.asp.net/jezell/archive/2003/09/17/27869.aspx - http://weblogs.asp.net/jezell/archive/2003/09/17/27869.aspx

I'm guessing that creating a subdomain on your DNS server will be specific to your server, take a look throught the docs. It will no doubt have some kinda COM API



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net