[This is preliminary documentation and subject to change]

# Edit-While-Running Scenario 6

This scenario illustrates how edit-while-running works under the following conditions:

- Two administrators edit the MetaBase.xml file at the same time.

What you will learn:

- Why allowing multiple users to simultaneously edit the MetaBase.xml file in not recommended and not supported.

Step 1:
At the same time, two users open the MetaBase.xml file using Notepad.

Step 2:
User 1 changes the value of A (A=2) and saves MetaBase.xml.

1. When User 1 saves MetaBase.xml, to determine the changes that were made to MetaBase.xml, IIS checks the difference between the new MetaBase.xml file and the history file of the same major version number with the highest minor version number.
2. The changes are sent to the in-memory metabase through the Admin Base Objects.
3. A new history file is created with the contents of the corresponding history file and the changes that were sent to the Admin Base Objects.

Step 3:
User 2 changes the value of C (C=2) and saves MetaBase.xml.

1. When User 2 saves MetaBase.xml, to determine the changes that were made to MetaBase.xml, IIS checks the difference between the new MetaBase.xml file and the history file of the same major version number with the highest minor version number.
2. The changes are sent to the in-memory metabase through the Admin Base Objects.
3. A new history file is created with the contents of the corresponding history file and the changes that were sent to ABO.

Because the two users open MetaBase.xml at the same time, the corresponding history file should be MetaBase_0000000008_0000000000.xml for both administrators. When User 1 saves MetaBase.xml in step 2, IIS compares the MetaBase.xml file that User 1 saves against the file with the highest minor version number and the same major version number, which is MetaBase_0000000008_0000000000.xml. In this case, the proper history file is used to determine the changes that User 1 has made to MetaBase.xml and a new history file, MetaBase_0000000008_0000000001.xml, is created in the history folder.

When User 2 saves MetaBase.xml, IIS compares MetaBase.xml against the history file of the same major version number and highest minor version number, MetaBase_000000008_0000000001.xml, which is not the corresponding history file. Because User 2's MetaBase.xml file is compared to the incorrect history file, User 1's edit (A=2) is overwritten with the previous value (A=1) because IIS perceives that the value of A has changed.

phrase 1, phrase 2, phrase 3

© 1997-2001 Microsoft Corporation. All rights reserved.