Click here to Skip to main content
12,896,633 members (80,397 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
I'm working with a Web.config file and running on iis 7 using 3.5.
I was wondering if there is a way to keep a list of default documents in a separate file.

for instance instead of this:
        <remove value="Default.htm" />
        <add value="portalmain.aspx" />

We read the values from another config file:
     <files configSource="WebDefaultDocuments.config"/>

Posted 28-Sep-12 11:09am
Updated 28-Sep-12 11:17am
andy400 28-Sep-12 17:36pm
Ok thanks, I was looking into a way to read default document from an external config file but I'm not sure I can do that inside system.webserver
Marcus Kramer 28-Sep-12 22:27pm
I'm curious, why would you want to?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

AFAIK, it cannot be done.

File is just an element without any attributes defined as per documentation.
Refer details here: MSDN: defaultDocument Element [IIS Settings Schema][^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170424.1 | Last Updated 28 Sep 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100