动态创建子域 [英] Creating Subdomain dynamically

查看:76
本文介绍了动态创建子域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有自己的域名-www.XXX.com
如果我想使用asp.net c#
创建子域-abc.XXX.com
稍后,当abc用户在浏览器URL中输入abc.XXX.com时,它将打开其界面.

我们怎样才能做到这一点?

谢谢,
Sneha

Hi,

I have my own domain - www.XXX.com
If I want to create subdomain - abc.XXX.com using asp.net c#

Later, when abc user will enter abc.XXX.com in browser URL, it will open his interface.

How can we achieve this?

Thanks,
Sneha

推荐答案

仅当您的DNS(域名服务)软件知道您的子域时,才可能对子域提出请求.
要从C#创建子域,您必须编写一个集成层以与DNS连接并在其中创建适当的DNS记录.
显然,只有在您的DNS软件提供了一种可以与之交互的API且您对此具有管理员权限时,这才是可能的.

向您的DNS管理员发送电子邮件并要求他创建子域并将其指向您的WebServer的IP地址可能更容易.
Answering requests for subdomains is only possible if your DNS (Domain Name Service) software knows about your subdomain.
To create a subdomain from C# you have to write an integration layer to connect with your DNS and create appropriate DNS record in it.
This is obviously only possible if your DNS software offers a kind of API to interact with and that you have admin rights on it.

It is probably easier to send an email to your DNS administrator and ask him to create the subdomain and make it point to the IP adress of your WebServer.


这篇关于动态创建子域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆