Validate the change by typing AppCmd List CONFIG ???Default Web Site???
/Section:DefaultDocument and pressing Enter. Figure 24.13 shows the results of this change. Notice
that the figure shows that the change affects only the Default Web Site and not the Web server itself.
Figure 24.13
Remove items from a
list using a zero-based
item number.
Sometimes you need to add an item to a collection. You can specify the position in which to add
it as part of the addition. The position is important because it determines the order in which IIS 7
looks for the item. For example, when working with a default document, IIS 7 would look for
Default.HTM as the first default document using Figure 24.13 as an example. IIS 7 would work
its way through the list and look for Index.HTML last. If you want to add a document named
Welcome.HTML as the first document in the list, you??™d type AppCmd Set CONFIG ???Default Web
Site??? /section:DefaultDocument /+Files.[@Start,value=OWelcome.HTML??™] and press
Enter. In this case, you use a plus sign (+) to tell AppCmd that you want to add an element to the
list. The square brackets ([]) show how to add the item. You specify a position that can include a
number (@1), @Start, or @End, followed by the attributes and their values.
Pages:
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288