How to Restore a Deleted SharePoint IIS Site

Published by on August 7th, 2012

Has your SharePoint site gone missing from IIS Server altogether? In this tutorial, Fpweb.net SharePoint Engineer Joe Beyer walks through the process of restoring a SharePoint site that has been deleted from IIS.

warning sign: Oops!

Just the other day, I was presented with an issue that I am actually surprised does not surface more often. The IIS site associated with my SharePoint site was accidentally deleted.

Now, I know if it were the Central Administration site, that we could re-provision that using psconfig.exe command(s). But it’s a little different for a missing SharePoint site.

I first realized the site was deleted when I was greeted with the following message when attempting to browse to said site:

browser screenshot: 404 - Site Not Found

Although the site is no longer visible though IIS, the Virtual Directory path (%SystemRoot%/inetpub/wwwroot/wss/VirtualDirectories/) still remains in the file system. I attempted to add a new site via IIS by using the same name and pointing to the Virtual Directory as shown here:

screenshot: Add Web Site alert box in IIS

Once the new site was created, I attempted to browse to the site once again and received an HTTP 404 error. Once this failed, I deleted the newly created IIS site to continue further troubleshooting. At this time, I started thinking that an environment restore would be necessary. Wanting to avoid a restore at all costs, I decided to attempt to extend the Web Application using the same URL’s as the root site collection. This is all done through Central Administration.

*Before extending the Web Application, I went in to the virtual directory path and copied the respective path to create a backup copy.

  1. Browse to Central Administration > Application Management > Manage Web Applications.
  2. Highlight the appropriate Web Application and click on Extendlocated on the Ribbon bar:SharePoint screenshot: Extend Web Applications
  3. On the Extend Web Application to Another IIS Web Sitepage, enter the same name as the IIS site was previously. For Host Header, enter a unique value, but similar to the previous URL. For this example, these values are as follows:SharePoint screenshot: Extend Application to Another Site
  4. Click OK.

When this is complete, you should now be able to browse to the site. When extending the Web Application, SharePoint will attempt to locate the appropriate IIS site. If the site does not exist (which is the case here), it will recreate it.

IIS screenshot: Site Bindings alert box

Now that the IIS site exists once again, I can now successfully browse to the site and it appears just how I left it!

Screenshot of standard default SharePoint 2010 Site

Questions? Comments? Feel free to leave your thoughts below & I will try to respond quickly. Thanks for reading!

About Joe Beyer

Joe Beyer has written 27 posts in this blog.

If Joe's not busy administering SharePoint, he's busy learning more about it, cause let’s face it…no one knows everything about it. Joe builds and maintains many of the SharePoint environments, ranging in size from single to multi-server. He's a huge fan of the Cardinals and Packers and Joe recently hitched a ride on the Crossfit bandwagon and has yet to fall off. He enjoys hunting and fishing any chance he can get, primarily at the Lake of the Ozarks. Keep up with Joe on Twitter @JoeRBeyer or
Follow Joe on Google+

VN:F [1.9.22_1171]
Rating: 8.3/10 (3 votes cast)

 
  1. August 8th, 2012 at 08:49 | #1

    Wow, what a nightmare, this is a great tip for real-time recovery!

    joel

  2. August 9th, 2012 at 01:29 | #2

    Great tip. Keep walking, Joe.

    Actually its configuration is available for restore.

    -T.s

  3. Ivan
    November 23rd, 2012 at 06:58 | #3

    A simpler solution would be to stop and restart the SharePoint Web Application Service. Also, this could be done through the object model: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.provisionglobally.aspx

  4. August 21st, 2014 at 22:43 | #4

    I’m very happy to discover this web site. I need to to thank you for ones time just for this wonderful read!!
    I definitely really liked every part of it and i also
    have you saved as a favorite to check out new things in your
    website.

  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *


+ 1 = two

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>