Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 28, 2012 05:33 AM by jignesh.jinjariya
Feb 27, 2012 01:35 PM|LINK
Hi every one,
I want to create subdomain programmaticaly in asp.net with c#.
My need is when any user get registered with my website then it will be directly redirect to their own private area(i.e, www.username.sitename.com).
I want to maintain different user session with the same browser (i.e, www.user1.sitename.com is sepertly managed than the www.user2.sitename.com with same browser) so i think URL Rewriting will not going solved this issue.
some of queries I am having please guide me.
1) Is it possible to create subdomain programmatically in asp.net C# ?
2) Dedicated Web server is required for creating subdomains programmatically in asp.net c# ?
so please guide me for this issue.
Feb 27, 2012 02:17 PM|LINK
If you have a wildcard DNS record, and a binding for your website in IIS by IP address (or port. Just not host header), you should have no problem sending requests for all your subdomains to your application.
Do you need a dedicated web server? Not necessarily, you just need a dedicated ip address.
At that point, you can get the host name from the request and handle it whichever way you see fit. I imagine url rewriting would work just fine, although I'm not sure which existing modules support this scenario. You might have to write your own.
Feb 28, 2012 05:33 AM|LINK
Thanx for your valueable replay :)