Tuesday, December 4, 2007

Change web site ID in IIS to solve path not found error

It cost me 2 hours to find the solution.
Situation:
SharePoint server A is also a SMS distribution server, but when SMS server B tried to push package to A, it always fail.
Process:
Check log, find it always report '/w3svc/1/root path cannot find'. But there is no this path.
After check a lot of documents, I find it's something stored for IIS as register tree. The only way to see it is by using a script called adsutil.vbs.
Compare server A and server B, I found that server A 80 port ID is not 1, but 1234567. Why? Because when we setup SharePoint server, we deleted the original server application, and created a new one on port 80, so it was assigned a random number.
So the next step is to change the number to 1.
Here is how:
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs STOP_SERVER W3SVC/1234567
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs MOVE W3SVC/1234567 W3SVC/1
CSCRIPT %SYSTEMDRIVE%\Inetpub\AdminScripts\adsutil.vbs START_SERVER W3SVC/1
Result:
After change, everything is OK!

Search

Google