When running the Service Pack 1 setup for Exchange 2007, you might get

Exchange Server component Client Access Role failed.

Error: Error:
Unable to create Internet Information Services (IIS) directory entry. Error message is: The system cannot find the path specified.
. HResult = -2147024893.

The system cannot find the path specified.

This can also be found in event log.

This is yet another one of these annoying problems which can mean multiple things and have multiple solutions (doh)

so to explain my scenario, we need to go back in time.

The Exchange 2007 installation was installed from scratz, and in 3 roles (Hub transport, Edge transport,Client Access Server (CAS) )

Since this was before my time, i assume that what went wrong, was that the CAS role was not entirely dedicated to our “CAS” server, since the Hub transport server had the role too, without using it tho.

i have written about this before, some weird message appearing in the console

http://www.annoying.dk/2008/06/09/microsoft-exchange-error-the-following-errors-were-reported-while-loading-topology-information/

(took a while to find out that the hub transport actually had the CAS role, it had never crossed my mind)

One thing i hate about the installation of SP1, is that it spends 20minuts doing checks, and prepares for everything, and then it stumples upon something lame (HEY YOU, you got a powershell open, close it ! ) and then you can restart SP1 setup.

We then tried to uninstall CAS role, by doing

setup.com /mode:uninstall /roles:ca

which just laughed at me and told me that it wouldnt do it since i had earlier started SP1 setup, and now i should finish it…. ?

I finally started checking logs (i know, shoud have done that from the start but..)

checking out c:\ExchangeSetupLogs\ExchangeSetupLog.txt gave me

[28-09-2008 18:32:12] [2] [WARNING] IIS://server.annoying.lan/W3SVC/1/ROOT/Microsoft-Server-ActiveSync was not found. Please make sure you have typed it correctly.
[28-09-2008 18:32:12] [2] Administrator Active Directory session settings are:Â View Entire Forest: ‘True’, Configuration Domain Controller: ‘ad.annoying.lan’, Preferred Global Catalog: ‘ad.annoying.lan’, Preferred Domain Controllers: ‘{ ad.annoying.lan }’
[28-09-2008 18:32:12] [2] Searching objects “server\Microsoft-Server-ActiveSync (Default Web Site)” of type “ADMobileVirtualDirectory” under the root “$null”.
[28-09-2008 18:32:12] [2] Previous operation run on domain controller ‘ad.annoying.lan’.
[28-09-2008 18:32:12] [2] [ERROR] Unable to create Internet Information Services (IIS) directory entry. Error message is: The system cannot find the path specified.
. HResult = -2147024893.
[28-09-2008 18:32:12] [2] [ERROR] The system cannot find the path specified.

[28-09-2008 18:32:12] [2] [WARNING] Object server\Microsoft-Server-ActiveSync (Default Web Site) has been corrupted and it is in an inconsistent state. The following validation errors have occurred:
[28-09-2008 18:32:12] [2] [WARNING] Exchange has detected an inconsistency in the Active Directory configuration for the following virtual directory(ies). This can happen if Mobile Sync virtual directories were deleted in Internet Services Manager. Please verify that you have access to the metabase on the servers listed below. In order to fix this inconsistency, run the following command, which will remove references to these virtual directories from the Active Directory:

Remove-ActiveSyncVirtualDirectory -Identity “Microsoft-Server-ActiveSync (Default Web Site)”
[28-09-2008 18:32:12] [2] Ending processing.
[28-09-2008 18:32:12] [2] Ending processing.
[28-09-2008 18:32:12] [1] The following 1 error(s) occurred during task execution:
[28-09-2008 18:32:12] [1] 0. ErrorRecord: Unable to create Internet Information Services (IIS) directory entry. Error message is: The system cannot find the path specified.
. HResult = -2147024893.

so yea, why on earth is it trying to contact my hub transport (i named it server.annoying.lan here )

note that “Microsoft-Server-ActiveSync” etc can be other services, but the error message itself looks the same.

another line

[WARNING] IIS://server.annoying.lan/W3SVC/1/ROOT/EWS was not found. Please make sure you have typed it correctly.

is the semi important one.

the funny thing about this, is that the IIS dosnt have any virtual directories, not even a single file/folder/option that makes you believe that exchange has been on it.

but since exchange belives it, theres no other way.

Remove-WebServicesVirtualDirectory -identity “Server\EWS (Default Web Site)”

EWS is the one missing, and aslong as its missing, other virtual directories within it cannot be made or removed (as far as i remember) so remove it from exchange’s memory, and recreate it with

new-webservicesvirtualdirectory -ExternalUrl https://server.annoying.lan/EWS/exchange.asp

it it dosnt complain, the setup should now be able to create the desired virtual directories required for the CAS role (even tho i dont need it)

the SP1 installation then went smooth, and i was able to remove CAS role later on without any problem.

Before ending, i should make aware of that all this happend in a planned downtime schedule, and with all the problems appearing from out of the blue, i barely had the time to take notes and/or understand it all fully. so this post might contain alot of nonsense and errors, so please make me aware of it :)

another blog that helped me getting closer to my issue is

blog.justinho.com

and a few ms tech links explaining the commands i used

Remove-WebServicesVirtualDirectory

New-WebServicesVirtualDirectory