Recreate Virtual IIS directories

This post comes via Ray and Damian at Microsoft, via Les!


Sometimes, things just get so screwed up that you want to re-create the virtual directories. I know the feeling. Thanks to Ray Fong and Damian Leibaschoff (both MS) for previous posts, here is how to do it.

In IIS, expand Default Web site and remove the following virtual directories:
– EXCHANGE
– EXCHWEB
– PUBLIC
– OMA
– EXADMIN
– (Do not remove EXCHANGE-OMA)
 
Then, enable real time editing of the metabase in IIS admin, for this:
1. Open properties on the server object.
2. Check the box ‘Enable direct metabase edit’
3. After this, open windows explorer and navigate to the following directory: windows\system32\inetsrv
4. Edit metabase.xml (make a backup first) with notepad and navigate to the following section:  /LM/DS2MB/HighWaterMarks
5. Set the Value=”207778″ to zero or delete it.  This value will be located in a string value like the following (The value may be different):

 /LM/DS2MB/HighWaterMarks/{79F81D41-A652-4375-85F0-41A16037CC85} >
 <Custom
  Name=”UnknownName_61472″
  ID=”61472″
  Value=”207778″ <—– Set this to “0”
  Type=”STRING”
  UserType=”IIS_MD_UT_SERVER”
  Attributes=”NO_ATTRIBUTES”
 
6. Alternatively, you can use Metaedit to make these changes.
7. Save the file.
8. Run IISRESET and then re-start the MsExchangeSA service.
 
The deleted virtual directories should get re-created after a few minutes from the information that Exchange keeps in Active Directory.
— 
Les Connor [SBS Community Member]
————————————-
SBS Rocks !

11 thoughts on “Recreate Virtual IIS directories

  1. I ran across your entry for recreating virtual directories, I’m wondering if this solution can be modified to move the location of OWA from one website to another website on the same computer. Because of our Firewall we can only have one website accessible to the internet, and we’d like to put OWA on the website that we’ve created for our company website.

    Do you think this solution can be modified for my situation, I haven’t been able to find any resources on the internet that sounded as helpful as this possibility.

    thank you!

  2. It worked for me….Make sure you follow that last step ….Running IISRESET then restart the exchange system attendant. I used the microsoft tech version of this and They left off that step and it didnt work. I followed the above directions and it worked the first time.

  3. Tried and Tried… OWA Virtual Directories will not recreate…

    My Default Web Site was gone completely… any ideas on how to recreate the Default Web Site, where it points to etc… then maybe the recreate process would work.

  4. Hey,

    That’s for the article. I have a question. What’s Exchange-OMA? I don’t have it in my IIS structiure. Could this be the problem?

    Thanks,

    T

  5. Exchange-OMA directory is specific for Microsoft Small Business Server (SBS) by design. You can (or must) create this directory for "onebox" configuration.

    Also, see TechNet article 817379 for further…

  6. This process didn’t recreate the directories for me either. However, these were the steps I used to fix this issue, and it was the only thing that worked; though I’m not sure why.

    Backup the existing Exchange Virtual Directories.

    Delete the Directories.

    Edit the metabase.xml file (where I had 2 entries for Name=”UnknownName_61472″)

    run IISRESET

    Stop & Restart the System Attendant

    Wait a few minutes for it to recreate the Directories, which it never did.

    Create a New Virtual Directory from File and pointed to the back up files I created a few minutes earlier.

    run IISRESET

    Received a 400 error message, but I tried it again in 2 minutes and everything worked fine.

    Like I said, Not sure WHY it worked, but it did. All other KB’s I read didn’t do anything to resolve the issue.

    Thanks for posting this since it helped me resolve my issue.

    Charles

  7. for this to work the website id has to be 1

    use the adsutil to stop w3svc/(identifier of site)
    then adsutil move w3svc/(indenfitier of site) w3svc/1
    that will change from whatever number to 1
    then adsutil to start w3svc/1 and all will work

  8. Les,

    Thanks!!!!!!!!!!!!!!!!

    This document saved my day.

    After doing something in IIS, my OWA was ruïned. Mail etc. showed as if logged in to a FTP server.

    Now it’s fixed again. Thanks to this document.

    Bas Auer

Leave a Reply

Your email address will not be published. Required fields are marked *