473,383 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

create subdomain in IIS with C#

I have a web site that allows users to register. When they register,
I'd like to create a subdomain that points to their profile page. Does
anyone know how to do this in IIS through a c# asp.net page? Thanks.

Jul 8 '06 #1
6 3815
When you say "Subdomain", i assume you are talking about host headers? Like,
username.yoursite.com

Yes?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"vtxr1300" wrote:
I have a web site that allows users to register. When they register,
I'd like to create a subdomain that points to their profile page. Does
anyone know how to do this in IIS through a c# asp.net page? Thanks.

Jul 8 '06 #2

Peter wrote:
When you say "Subdomain", i assume you are talking about host headers? Like,
username.yoursite.com

Yes?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
yes.

Jul 9 '06 #3
Many so call system administrators want to restrict the right for developer
to create a domain but sometime you won't have a choice. The faster and
efficient way can be just create it using IIS manager. Of course everything
can be done in theory but how efficient is the question that we should ask.

chanmm

"vtxr1300" <ca********@hotmail.comwrote in message
news:11*********************@35g2000cwc.googlegrou ps.com...
>
Peter wrote:
>When you say "Subdomain", i assume you are talking about host headers?
Like,
username.yoursite.com

Yes?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

yes.

Jul 9 '06 #4

chanmm wrote:
Many so call system administrators want to restrict the right for developer
to create a domain but sometime you won't have a choice. The faster and
efficient way can be just create it using IIS manager. Of course everything
can be done in theory but how efficient is the question that we should ask.

chanmm
I already spoke to the host about it and they said they don't have any
problems with me adding the host header programmatically if I can do
it. Now I just have to figure out how. I don't want to have to
manually go in and create it each time someone registers on my site.

Jul 9 '06 #5

OK. There are at least 2 ways to do this. One is with IIS Manager and create
host headers. The second and more flexible way is to use an ISAPI filter such
as ISAPI_REWRITE_LITE (that 's the free one) to do this via regex matches and
perform the redirects. For example you could have

peterbromberg.yourdomain.com
map to
yourdomain.com/users/defauilt.aspx?user=peterbromberg

Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"vtxr1300" wrote:
>
Peter wrote:
When you say "Subdomain", i assume you are talking about host headers? Like,
username.yoursite.com

Yes?
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com

yes.

Jul 9 '06 #6
I'm with Peter on security and best practice, but you should be able to hook
into the scripting COM object (WSH), find the vbs script (buried somewhere
in system32) that does the IIS stuff and basically pass the same lines of
code through in C#.

"vtxr1300" <ca********@hotmail.comwrote in message
news:11**********************@s13g2000cwa.googlegr oups.com...
>I have a web site that allows users to register. When they register,
I'd like to create a subdomain that points to their profile page. Does
anyone know how to do this in IIS through a c# asp.net page? Thanks.

Jul 9 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: anjupt | last post by:
Hi, I have wriiten a vb script to create a subdomain and have called that vbscript in Asp.net program.The problem i am not getting the result as in the subdomain is not getting created and there...
12
by: Tina | last post by:
Our company domain, say, wombat.com needs to create several subdomains: support, training, and purchase are three of the subdomains needed. So when someone browses to //training.wombat.com they...
1
by: Josh | last post by:
I have a question about subdomains. I would like my website to have subdomains that essentially show my regular main website, except that the subdomain passes as a variable on all pages so that I...
7
by: lmeyers | last post by:
I implemented a URL rewriter which worked reasonably well, but now I am creating other sites on the same server (single IP). Because IIS will not accept subdomain wildcards (*.subdomain.com), it...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.