• پایان فعالیت بخشهای انجمن: امکان ایجاد موضوع یا نوشته جدید برای عموم کاربران غیرفعال شده است

بوجو آوردن يك زير دامنه

HADI_EN

Registered User
تاریخ عضویت
20 مارس 2006
نوشته‌ها
242
لایک‌ها
2
مي خواستم بدانم چگونه مي توان يك زير دامنه در يك دامنه بوجود آورد به طور مثال در همين سايت دامنه اصلي

persiantools است و يكي از زير دامنه هاي آن Forum.persiantools است .



ممنون مي شم اگر جواب من را بدهيد.:) :) :D :D :D :D :):D :D :D
 

m3hrz4d

Registered User
تاریخ عضویت
21 سپتامبر 2005
نوشته‌ها
620
لایک‌ها
1
محل سکونت
اصفهان
اگه منظورت ساختن ساب دامین بصورت دستیه توی کنترل پنل سایت مثلا plesk میری توی قسمت Sub domains و اونجا دکمه ی add داره...

اما اگه منظورت درست کردن دامنه با استفاده از کده بعید میدونم بشه یه ساب دامین واقعی(از طریق DNS ) با کد ساخت مگر اینکه سرور اختصاصی باشه(که بازم نمیدونم چطوری!)...اما یه روش دیگه هم ساختن ساب دامین مجازی هستش که وقتی طرف مثلا میره تو Redirect, forum.persiantools.com بشه توی persiantools.com/forum
که در این مورد فکر کنم یه پست توی قسمت پی اچ پی بود...
 

amironline

Registered User
تاریخ عضویت
25 نوامبر 2003
نوشته‌ها
671
لایک‌ها
0
محل سکونت
Tabriz
چطوري ميشه با asp يه ساب درست كرد؟
اصلا ميشه با كدنويسي ساب دومين ساخت؟
 

H_R

مدیر بازنشسته
تاریخ عضویت
30 مارس 2005
نوشته‌ها
3,298
لایک‌ها
17
سن
42
محل سکونت
North Pole
بفرمایین قربان این هم جواب سوال شما !
کد:
In order to add a subdomain programatically, you'll need to somehow update the authoritative DNS server's configuration and a website's DNS server is typically not on the same server (it wouldn't be good practice to do that anyway.) The Windows DNS server stores its domain and subdomain information in a text file, and the DNS server loads that file when it restarts. 

If your DNS server is a Windows DNS Server and you have file write access to it, you could have VB.NET modify that text file, but then you've have to force the DNS server to restart. If you are controlling the servers, i.e. your servers are co-located or you have full access, you could write a web service for the machine hosting the DNS Server, and that web service could modify the text file and stop and restart the DNS service (I assume this is possible but I've never tried it to be sure.) I don't think you can interact with a standard (non Active-Directory integrated) DNS server with ADSI, but maybe you can. Of course this would take the DNS offline for a few seconds every so often. 

However, your best option is probably to use a Dynamic DNS server and buy or build a component to update the DNS since DDNS was designed for this. You could use a Dynamic DNS service, or get your own DNS server software that supports DDNS such as DNS Commander and host on a co-located server. I was able to find one component called BlackBytes DNS for .NET that claims it "Dynamically updates a DNS zone with addition or deletion records (RFC 2136)" and a license costs US$169. 

I hope this helped? If so, it'd be nice to know what you end up doing (email me.) Also, if my post was really helpful to you, even if you just found this via Google and are not Mohammed Elnahrawi, why not return the favor? Check out my How-To-Select Guides for .NET Developers, and register to be notified when we publish future Guides. 

P.S. Here are some other useful links for DNS and DDNS: 


http://www.zoneedit.com/doc/dns-basics.html 
http://labmice.techtarget.com/networking/dns.htm 
http://www.incognito.com/pdf/WP_IP_IPmanagementchallenges.pdf

--------------------------------------------------------------------------------
-Mike Schinkel
Publisher; How-To-Select Guides - .NET Developer Series
 
بالا