Third Level Domain And ASP.NET 2.0

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9zcyBOb3JuZXM=?=, Sep 3, 2006.

  1. I need to write and test a new ASP.NET 2.0 application that uses third level
    domains, like test.MyDomainName.Com. I just cannot figure out how to get the
    new development server to allow this, if its even possible.

    I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
    it does not like that. Then I added test.localhost to my host file to resolve
    to 127.0.0.1 and tried the same URL again and it works, but ASP code of
    Request.Url.Host only returns localhost. I have poked all around in the
    properties in the request object as well as the request.url object and cannot
    find anywhere were its picking up my domain prefix.

    Anyone dealt with this before?

    Thx in advance!

    Ross
     
    =?Utf-8?B?Um9zcyBOb3JuZXM=?=, Sep 3, 2006
    #1
    1. Advertising

  2. What you need to do is run a DNS server on your development server's box,
    configure your test subdomain, and use IIS instead of VS 2005's internal server.



    Juan T. Llibre, asp.net MVP
    aspnetfaq.com : http://www.aspnetfaq.com/
    asp.net faq : http://asp.net.do/faq/
    foros de asp.net, en español : http://asp.net.do/foros/
    ===================================
    "Ross Nornes" <> wrote in message
    news:...
    >I need to write and test a new ASP.NET 2.0 application that uses third level
    > domains, like test.MyDomainName.Com. I just cannot figure out how to get the
    > new development server to allow this, if its even possible.
    >
    > I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
    > it does not like that. Then I added test.localhost to my host file to resolve
    > to 127.0.0.1 and tried the same URL again and it works, but ASP code of
    > Request.Url.Host only returns localhost. I have poked all around in the
    > properties in the request object as well as the request.url object and cannot
    > find anywhere were its picking up my domain prefix.
    >
    > Anyone dealt with this before?
    >
    > Thx in advance!
    >
    > Ross
     
    Juan T. Llibre, Sep 3, 2006
    #2
    1. Advertising

  3. Cool, thx for the reply Juan!

    I figured it out now. People dont call these "third level domains" like I
    do, I guess the more common term is "subdomain". :) Go figure... Found lots
    more info on Google after figuring that out...

    Between your response and a few reponses to the subdomain google queries I
    did, I took a little more simplistic approach since I did not want stand up a
    DNS server on my box.

    For anyone else wanting a solution, what I did was setup the Windows XP IIS
    default website to point at my new ASP.NET 2.0 website I'm developing, I
    edited my host file and created domains in there like test1.localhost.com,
    test2.localhost.com and pointed them all at 127.0.0.1, then set up these test
    subdomains as host headers in the default IIS website and bingo, I have a
    functional test enviorment!

    Thx!

    Ross


    "Juan T. Llibre" wrote:

    > What you need to do is run a DNS server on your development server's box,
    > configure your test subdomain, and use IIS instead of VS 2005's internal server.
    >
    >
    >
    > Juan T. Llibre, asp.net MVP
    > aspnetfaq.com : http://www.aspnetfaq.com/
    > asp.net faq : http://asp.net.do/faq/
    > foros de asp.net, en español : http://asp.net.do/foros/
    > ===================================
    > "Ross Nornes" <> wrote in message
    > news:...
    > >I need to write and test a new ASP.NET 2.0 application that uses third level
    > > domains, like test.MyDomainName.Com. I just cannot figure out how to get the
    > > new development server to allow this, if its even possible.
    > >
    > > I have already tried http://test.localhost:2600/NewProject/Index.aspx, and
    > > it does not like that. Then I added test.localhost to my host file to resolve
    > > to 127.0.0.1 and tried the same URL again and it works, but ASP code of
    > > Request.Url.Host only returns localhost. I have poked all around in the
    > > properties in the request object as well as the request.url object and cannot
    > > find anywhere were its picking up my domain prefix.
    > >
    > > Anyone dealt with this before?
    > >
    > > Thx in advance!
    > >
    > > Ross

    >
    >
    >
     
    =?Utf-8?B?Um9zcyBOb3JuZXM=?=, Sep 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    445
  2. mike
    Replies:
    1
    Views:
    1,151
    Martin Honnen
    Nov 20, 2004
  3. =?Utf-8?B?SmVmZiBUdQ==?=

    Highlighting selected level 1 and level 2 menu items

    =?Utf-8?B?SmVmZiBUdQ==?=, Jan 27, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    516
    Thomas Hansen
    Jan 27, 2007
  4. pabbu
    Replies:
    8
    Views:
    733
    Marc Boyer
    Nov 7, 2005
  5. Scorpiion
    Replies:
    1
    Views:
    1,355
    Scorpiion
    Dec 25, 2008
Loading...

Share This Page