Categories
Who's Online
26 visitors online now
1 guests, 25 bots, 0 members
Support my Sponsor

OWA Virtual Directory missing in IIS after reinstalling CAS Role

One of my colleague mistakenly deleted OWA virtual directory from IIS. I tried uninstalled and reinstalled CAS server role but it fails with the following error message

Exchange Server component Client Access Role failed. Error: Error: An error occurred while creating the IIS virtual directory IIS://contoso.com/W3SVC/1/ROOT/owa on CAS1.

Cannot create a file when that file already exists.  (Exception from HRESULT: 0x800700B7)

Solution:

This seems OWA file already exists but the OWA Virtual Directory is not visible in IIS, this means the last uninstallation didn’t remove the virtual directory properly and this caused a bad cache in IIS Metabase causing the reinstallation from creating the OWA virtual directory. If OWA virtual Directory is not visible in IIS doesn’t mean it not exists, please check the IIS 7.0 Metabase

  1. Find adsutil.vbs script on the CAS server, usually it’s in SystemDriver\Inetpub\AdminScripts
  2. Then open cmd window, and “cd” to the above path
  3. Use the command below to check the metabase, see if there’s any remained trace about  /OWA virtual directory

Cscript adsutil.vbs enum w3svc/1/root

  • Try to uninstall iis and reinstall it back delete ClientAccessRole Key under HKLM\software\microsoft\exchange\v8.1 Go to ADSIEDIT => Exchange Servername object and change the value of msexchcurrentserver to 34
  • And start the CAS setup again
  • The IIS configuration files are located in ApplicationHost.config. This file is located in %windir%\system32\inetsrv\config. Found the below entry even with no owa vdir in IIS manager, remove the entries below and reinstall the CAS server role

<application path=”/owa/8.1.263.0″ applicationPool=”MSExchangeOWAAppPool”>
<virtualDirectory path=”/” physicalPath=”C:\ProgramFiles\Microsoft\Exchange Server\ClientAccess\owa\8.1.263.0″ />
</application>

  • Or if this doesn’t work then try the following steps:
  1. Remove CAS and Hub roles (if exists)
  2. Remove IIS from the server
  3. Restart the server
    Notes: If the ApplicationHost.config is still present, it can be deleted
  4. Reinstall IIS, and CAS and Hub roles (if exists)

Leave a Reply