Exception: The system cannot find the path specified

After installing the updates for SharePoint 2010, PSConfig Wizard was failing on Step 8 of 9.

We started off with looking at the Upgrade.log file

Note: Upgrade Error.log file contains only error and at times would not provide clarity on the actions which were getting performed.

From the Upgrade.log file:

[PSCONFIG] [SPWebApplicationSequence] [DEBUG] [3/24/2011 8:41:41 AM]: Cannot find any iis web site with Server Comment = [Default Web Site]

[PSCONFIG] [SPWebApplicationSequence] [DEBUG] [3/24/2011 8:41:41 AM]: Adding a iis web site object with instance Id = [1]

[PSCONFIG] [SPUpgradeSession] [DEBUG] [3/24/2011 8:41:44 AM]: Disposing Microsoft.SharePoint.Administration.SPIisWebSite.

[PSCONFIG] [SPUpgradeSession] [ERROR] [3/24/2011 8:41:44 AM]: CanUpgrade [Microsoft.SharePoint.Administration.SPIisWebSite] failed.

[PSCONFIG] [SPUpgradeSession] [ERROR] [3/24/2011 8:41:44 AM]: Exception: The system cannot find the path specified.

[PSCONFIG] [SPUpgradeSession] [ERROR] [3/24/2011 8:41:44 AM]: at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)

at System.DirectoryServices.DirectoryEntry.Bind()

at System.DirectoryServices.DirectoryEntry.get_AdsObject()

at System.DirectoryServices.PropertyValueCollection.PopulateList()

at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)

at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)

at Microsoft.SharePoint.Administration.SPIisVirtualDirectory.get_Path()

at Microsoft.SharePoint.Administration.SPProvisioningAssistant.GetBuildVersionOnIisWebSite(Int32 iisInstanceId)

at Microsoft.SharePoint.Upgrade.SPSequence.get_CanUpgrade()

at Microsoft.SharePoint.Upgrade.SPUpgradeSession.CanUpgrade(Object o)

[PSCONFIG] [SPUpgradeSession] [ERROR] [3/24/2011 8:41:44 AM]: Cannot upgrade [Microsoft.SharePoint.Administration.SPIisWebSite].

Cause:

We have seen this happen when Default Web Site which hold the identifier 1 is deleted from IIS.

Resolution:

Re-create the Default Web Site with Identifier 1

In IIS 6.0

1. Right click on Web Sites folder and click New –> click Web Site…

2. Under Web Site Description type “Default Web Site” –> click Next

3. Under IP Address and Port Settings, keep everything as default –> click Next

4. Under Web Site Home Directory, click Browse and select “C:\Inetpub\wwwroot” –> click Next

5. Under Web Site Access Permissions, select Read and Run scripts (such as ASP) –> click Next

6. Click Finish

7. Now, you have a new “Default Web Site” created but the identity of the Web Site is not

8. Open the command prompt as an Administrator

9. Go to C:\Inetpub\AdminScripts and type cscript adsutil.vbs enum /w3svc

10. At the very bottom, you will see something like

[/w3svc/1403756263]
[/w3svc/998577302]

11. type cscript adsutil.vbs move /w3svc/998577302 /w3svc/1 and then do IISRESET

for e.g.,

C:\Inetpub\AdminScripts>cscript adsutil.vbs move /w3svc/998577302 /w3svc/1
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.moved from /w3svc/998577302 to /w3svc/1

C:\Inetpub\AdminScripts>iisreset

Attempting stop…
Internet services successfully stopped
Attempting start…
Internet services successfully restarted

12. Refresh IIS Manager and the “Default Web Site” has now the identity 1.

In IIS 7 / 7.5

In IIS 7 / 7.5

1. Open IIS Manager

2. Expand Server Under Connection Pane.

3. Right Click on Sites

4. Click on Add Web Site…

5. Under Site name: Default Web Site

6. Physical path : C:\inetpub\wwwroot

7. Application Pool : Default Web Site

Under IIS 7.5 when we re-cerate the Default Web Site will automatically set the identifier as 1

Re-try Upgrade:

1. Open Command prompt and navigate to following location

In SharePoint 2007:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Bin

In SharePoint 2010:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\Bin

2. Execute the below command

PSConfig.exe –cmd upgrade –inplace b2b –wait –force

Hopefully the upgrade will continue without a hitch!