Hosting multiple applications with individual domain names on onehost

Discussion in 'ASP .Net' started by mc, Dec 13, 2006.

  1. mc

    mc Guest

    I would like to host two websites on my brinkster developer account.

    I have configured the multiple applications and they both work fine,
    they can be access at: -

    myalias.brinkster.net/site1

    and

    myalias.brinkster.net/site2

    I have two domain names that I want to point to each of the sites

    www.site1.com

    and

    www.site2.com

    however the only facility brinkster offer is to have both the domain
    names resolving to the root of my site (i.e. myalias.brinkster.net).

    I have placed a default.aspx page with a switch statement based on the
    url request and then dot a redirect to myalias.brinkster.net/Site1 or
    myalias.brinkster.net/Site2 respectively.

    This works and the applications work fine but the urls then read,
    www.site1.com/Site1 and www.site2.com/Site2.

    I gather I could use URL rewriting to address this issue however all
    attempts so far to use context.RewritePath() have resulted in the
    applications not working. I get an error about not being able to find my
    HTTP Handlers I have defined in the web.config of the application.

    Could someone propose a way I could implement URL rewriting or any other
    technique to enable me to support this configuration?
    mc, Dec 13, 2006
    #1
    1. Advertising

  2. mc

    bruce barker Guest

    Re: Hosting multiple applications with individual domain names onone host

    you can not use asp.net url rewriting to go between applications. you'd
    need an isapi filter for this (probably not allowed by brinkster).

    if you convert the two sites into one vdir then you can use url rewriting.

    -- bruce (sqlwork.com)

    mc wrote:
    > I would like to host two websites on my brinkster developer account.
    >
    > I have configured the multiple applications and they both work fine,
    > they can be access at: -
    >
    > myalias.brinkster.net/site1
    >
    > and
    >
    > myalias.brinkster.net/site2
    >
    > I have two domain names that I want to point to each of the sites
    >
    > www.site1.com
    >
    > and
    >
    > www.site2.com
    >
    > however the only facility brinkster offer is to have both the domain
    > names resolving to the root of my site (i.e. myalias.brinkster.net).
    >
    > I have placed a default.aspx page with a switch statement based on the
    > url request and then dot a redirect to myalias.brinkster.net/Site1 or
    > myalias.brinkster.net/Site2 respectively.
    >
    > This works and the applications work fine but the urls then read,
    > www.site1.com/Site1 and www.site2.com/Site2.
    >
    > I gather I could use URL rewriting to address this issue however all
    > attempts so far to use context.RewritePath() have resulted in the
    > applications not working. I get an error about not being able to find my
    > HTTP Handlers I have defined in the web.config of the application.
    >
    > Could someone propose a way I could implement URL rewriting or any other
    > technique to enable me to support this configuration?
    bruce barker, Dec 13, 2006
    #2
    1. Advertising

  3. mc

    mc Guest

    Re: Hosting multiple applications with individual domain names onone host

    Unfortunately this would require a full rewrite of both sites as the
    applications use many application relative "~" paths.

    Your probably right brinkster are very unlikely to allow me to have
    personal ISAPI filters.

    bruce barker wrote:
    > you can not use asp.net url rewriting to go between applications. you'd
    > need an isapi filter for this (probably not allowed by brinkster).
    >
    > if you convert the two sites into one vdir then you can use url rewriting.
    >
    > -- bruce (sqlwork.com)
    >
    > mc wrote:
    >
    >> I would like to host two websites on my brinkster developer account.
    >>
    >> I have configured the multiple applications and they both work fine,
    >> they can be access at: -
    >>
    >> myalias.brinkster.net/site1
    >>
    >> and
    >>
    >> myalias.brinkster.net/site2
    >>
    >> I have two domain names that I want to point to each of the sites
    >>
    >> www.site1.com
    >>
    >> and
    >>
    >> www.site2.com
    >>
    >> however the only facility brinkster offer is to have both the domain
    >> names resolving to the root of my site (i.e. myalias.brinkster.net).
    >>
    >> I have placed a default.aspx page with a switch statement based on the
    >> url request and then dot a redirect to myalias.brinkster.net/Site1 or
    >> myalias.brinkster.net/Site2 respectively.
    >>
    >> This works and the applications work fine but the urls then read,
    >> www.site1.com/Site1 and www.site2.com/Site2.
    >>
    >> I gather I could use URL rewriting to address this issue however all
    >> attempts so far to use context.RewritePath() have resulted in the
    >> applications not working. I get an error about not being able to find
    >> my HTTP Handlers I have defined in the web.config of the application.
    >>
    >> Could someone propose a way I could implement URL rewriting or any
    >> other technique to enable me to support this configuration?
    mc, Dec 13, 2006
    #3
  4. mc

    Guest

    Re: Hosting multiple applications with individual domain names on one host

    > This works and the applications work fine but the urls then read,
    > www.site1.com/Site1 and www.site2.com/Site2.



    Maybe I'm missing something, but what does it matter what the URLs read
    if all the paths are relative?
    , Dec 13, 2006
    #4
  5. Re: Hosting multiple applications with individual domain names on one host

    Hi MC,

    I also think using IIS isapi filter would be the prefered appraoch since
    that can help avoid involving such additional redirection code logic into
    our ASP.NET web application's code. Anyway, you can try contact your web
    hoster to see whether this is possible.


    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Dec 14, 2006
    #5
  6. mc

    mc Guest

    Re: Hosting multiple applications with individual domain names onone host

    wrote:
    >>This works and the applications work fine but the urls then read,
    >>www.site1.com/Site1 and www.site2.com/Site2.

    >
    >
    >
    > Maybe I'm missing something, but what does it matter what the URLs read
    > if all the paths are relative?
    >

    Well, it matters nothing when you enter the site from the domain name
    alone (and browse the site from there) or you don't look at the
    addresses bar but when you want to go to a specific area to a site it
    means you need to type in an extra directory in the url

    if I bookmark my news page the bookmark will be
    http://www.site1.com/Site1/News/index.aspx.

    I dont want the extra Site1 in the url.
    mc, Dec 14, 2006
    #6
  7. mc

    mc Guest

    Re: Hosting multiple applications with individual domain names onone host

    Steven Cheng[MSFT] wrote:
    > Hi MC,
    >
    > I also think using IIS isapi filter would be the prefered appraoch since
    > that can help avoid involving such additional redirection code logic into
    > our ASP.NET web application's code. Anyway, you can try contact your web
    > hoster to see whether this is possible.
    >
    >
    > Sincerely,
    >
    > Steven Cheng
    >
    > Microsoft MSDN Online Support Lead
    >
    >
    >
    > This posting is provided "AS IS" with no warranties, and confers no rights.
    >

    I have just had my suspicions confirmed, Brinkster will not permit the
    addition of ISAPI filters on there shared hosting packages.

    Is there a purely ASP.NET solution?
    mc, Dec 14, 2006
    #7
  8. Re: Hosting multiple applications with individual domain names on one host

    Hi MC,

    Thanks for the reply.

    I'm afraid a pure ASP.NET solution would be quite limited here. This is
    because for file path redirection, what we have is url rewriting, however,
    this has no effect on directory based path (such as Http://server/app/dir1/
    ) since they're not processed by ASP.NET engine. BTW, how are you using the
    Context.RewritePath currently? Are you using a custom httpModule and do the
    url rewriting in it? Here is a msdn article detailed describe add URL
    rewriting in ASP.NET application:

    #URL Rewriting in ASP.NET
    http://msdn2.microsoft.com/en-us/library/ms972974.aspx

    Sincerely,

    Steven Cheng

    Microsoft MSDN Online Support Lead


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng[MSFT], Dec 18, 2006
    #8
  9. mc

    Larry Bud Guest

    Re: Hosting multiple applications with individual domain names on one host

    mc wrote:
    > wrote:
    > >>This works and the applications work fine but the urls then read,
    > >>www.site1.com/Site1 and www.site2.com/Site2.

    > >
    > >
    > >
    > > Maybe I'm missing something, but what does it matter what the URLs read
    > > if all the paths are relative?
    > >

    > Well, it matters nothing when you enter the site from the domain name
    > alone (and browse the site from there) or you don't look at the
    > addresses bar but when you want to go to a specific area to a site it
    > means you need to type in an extra directory in the url


    Who types in URLs to a specific page?
    Larry Bud, Dec 18, 2006
    #9
    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. Andrew Thompson
    Replies:
    5
    Views:
    317
    Tor Iver Wilhelmsen
    Oct 25, 2003
  2. AF
    Replies:
    8
    Views:
    1,044
    Chrissy Cruiser
    Aug 23, 2004
  3. Andy B
    Replies:
    1
    Views:
    310
    Evan Camilleri
    Jul 29, 2008
  4. rocketvinay
    Replies:
    0
    Views:
    602
    rocketvinay
    Jul 11, 2010
  5. teo1991
    Replies:
    0
    Views:
    549
    teo1991
    Apr 2, 2009
Loading...

Share This Page