简体   繁体   English

我想使用asp.net在我的域下动态创建子域,C#?

[英]I would like to create subdomains Dynamically under my domain using asp.net ,C#?

I would like to create subdomains Dynamically under my domain using asp.net ,C#? 我想使用asp.net在我的域下动态创建子域,C#? I can not find good solution for this. 我找不到适合的解决方案。 What are the things i should do to complete this. 我应该做些什么来完成这项工作。

Scenario: 1.user register with site 2.domain name should be: http://username.domain.com 方案:1.用户向站点注册2.域名应为: http ://username.domain.com

Thanks 谢谢

Most DNS providers allow you to specify wildcard DNS . 大多数DNS提供程序都允许您指定通配符DNS That means you have an entry something like "*.example.com" that maps to your IP address. 这意味着您有一个条目,例如“ * .example.com”,它映射到您的IP地址。

If you do this, then you do not have to modify DNS entries on the fly, you just need to add an internal mapping in your database (or whatever) saying that "user1.example.com maps to user1", etc. 如果执行此操作,则不必立即修改DNS条目,只需在数据库(或其他内容)中添加内部映射,说明“ user1.example.com映射到user1”,依此类推。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM