An error has occurred after removal of an extended zone

Let’s say you’ve applied the advice from unextending an extended zone and are now either getting a blank page after re-using the the vanity url or you’re receiving a message that “Something has went wrong” or “An error has occurred”.

You ran

Get-SPWebApplication http://sitename.com | Remove-SPWebApplication http://sitename.com -Zone "Intranet"

 

and then the Intranet choice was available on the web application, the alternate access mapping for http://sitename.com was no longer associated with said web application and the world seemed right.

It seemed right until that vanity url was re-extended the web application.  It was at this point that an error occurred.  Or if you re-extended the same vanity URL on a different web application you are now getting a blank page and no semblance of your SharePoint site.

Here’s what to do:  Navigate to the physical storage for each site on each server that is a member of your web garden \ SharePoint Farm, barring the SQL boxes, and make sure that the site was removed from IIS.

If you see the folder located there in the virtual directory, go back and first remove the site from IIS, as it is more than likely still there, then delete this folder.

In other words after unextending the site, navigate to inetpub\wwwroot\wss\virtualdirectories and make sure that the folder is gone, then look in IIS and make sure that the site is also not hanging around, if they are, delete them.  Repeat on each server that is a member of your farm (web garden) and then reset IIS on all servers in the farm.

Sorry about not including that in the original post, good luck and cheers!  Stacy