ASP.NET issue with domains outside of route directory

Posted on 2010-01-07
Last Modified: 2013-12-24
I have several domains registered to use on some webspace I have with 1and1 hosting.
The whole webspace has a route directory and the rest of the domains held in folders under this.
Deploying the first site to it's own subdirectory (which I have registered as the destination in the 1and1 control panel), I came up with an issue with the web.config folder which I was told needs to be in the root of the webspace and not the site subfolder alone. Doing this I now have an issue with the root path for for my files including  MasterPageFile="~/MasterPage.master" in my site.
I am looking for a solution across all subdomains where each can be managed with there own web.config file and that each hosted and registered subdirectory is recognised as the root for that site.

Question by:Simon Cripps
    1 Comment

    Accepted Solution

    What needs to happen is that the dafault.aspx page in the root directory have  a redirect script placed in it such as  

    host = Request.ServerVariables("HTTP_HOST")

    if host = "" or host = "" then

    elseif host = "" or host = "" then


    end if

    Subsites web config files will take presidence over the root file.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    #Citrix #Citrix Netscaler #HTTP Compression #Load Balance
    This is an article about my experiences with remote access to my clients (so that I may serve them) and eventually to my home office system via Radmin Remote Control. I have been using remote access for over 10 years and have been improving my metho…
    Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now