1

We are running Windows Server 2008 R2 with IIS 7.5 and have 4-5 Classic ASP sites to install. The main site is stored in wwwroot and the other sites are stored in folders below wwwroot.

We have 1 IP address for the server. How do I configure IIS to allow folks to browse/test the sites before domain names are pointed to te server?

When I setup one of the sites in a subfolder of wwwroot and assign a separate port to it, I receive a message stating:

Config Error Cannot add duplicate collection entry of type 'add' with unique key 
attribute 'value' set to 'index.asp'  

The error points to web.config in the given sites' folder as follows:

<configuration>
<system.webServer>
    <tracing>
        <traceFailedRequests>
            <add path="*">
                <traceAreas>
                    <add provider="ASP" verbosity="Verbose" />
                    <add provider="ASPNET" areas="Infrastructure,Module,Page,AppServices" verbosity="Verbose" />
                    <add provider="ISAPI Extension" verbosity="Verbose" />
                    <add provider="WWW Server" areas="Authentication,Security,Filter,StaticFile,CGI,Compression,Cache,RequestNotifications,Module,FastCGI" verbosity="Verbose" />
                </traceAreas>
                <failureDefinitions statusCodes="400-999" verbosity="Error" />
            </add>
        </traceFailedRequests>
    </tracing>
</system.webServer>

How do I remedy this error and permit IIS to render the site?

SidC
  • 369
  • 3
  • 9
  • 23

1 Answers1

3

Put each ASP app in its own site. Bind each site to the same IP, but use a different Host Header on each site. Register those host headers in your local DNS server.

Chris McKeown
  • 7,168
  • 1
  • 18
  • 26
  • Thanks. By local DNS server, do you mean the one on the web server? – SidC Oct 24 '12 at 00:14
  • I mean the DNS server that your local clients use to resolve DNS queries - if you're on an Active Directory domain, the DNS servers are usually the Domain Controllers. If you're not using AD and perhaps using a router to handle your DNS queries, you may have to resort to using entries in your hosts file (`%SystemRoom%\System32\Drivers\etc\hosts`) – Chris McKeown Oct 24 '12 at 07:55
  • This helped!! Is there a setting I need to change to browse each site by IP and port from a browser independent of the server? – SidC Oct 25 '12 at 22:26
  • You can't browse each site by ip address because they all run on the same ip address. You need to use a a valid URL to browse each site and you need to have each site configured with host headers for the relevant URL. So for www.mydomain1.com the host header would be www.mydomain1.com. – joeqwerty Oct 26 '12 at 15:52
  • @joeqwerty The domains in the host headers are live and hosted by another company at this time. Thus, when I browse ourdomain.com it resolves to the old server. How do we setup the new server to test prior to pointing the domains from the old server? – SidC Oct 26 '12 at 19:34
  • You can do one of two things: 1. On your internal DNS server create a DNS forward lookup zone for the domain and add the appropriate A or CNAME records for each site. This will break DNS resolution for the real site for your internal DNS clients. OR 2. Add host entries for each site that point to the new server in the hosts file of those computers that need to test the new site. This will break DNS resolution for the real site for these testing computers. – joeqwerty Oct 26 '12 at 19:41