locked
repair corrupted sharepoint site in IIS in web front end server RRS feed

  • Question

  • Experts,

    I have a sharepoint farm consists of 2 App Server, 2 WFE, 1 DB Server. This is a production farm. 2 WFE are load balanced (NLB).

    Problem: In WFE1, sharepoint site is removed/corrupted in IIS. When I checked the associated virtual directory path it was blank.

    Ask: How I can recover/repair the sharepoint site in IIS? I am a bit curious to run the SP product and configuration wizard in WFE as it is a production farm. If someone faced similar kind of issue and have steps to recover/repair it then please share. It will be great help.

    Thank you in advance,

    KK

    Wednesday, January 23, 2013 2:42 AM

Answers

  • Hi KK,

    First drain stop or move the WFE out of NLB rotation, then check to see if the path exists under C:\inetpub\wwwroot\wss\VirtualDirectories\YourWebAppName it will be the same path on your other WFE, if the folder is still there then open Internet Information Services (IIS) Manager > Right Click on the Site > Manage Web Site > Advanced Settings > Physical Path > and browse to the folder and click OK > Then OK again > IISRESET..

    If this is the only issue with the Site, you can copy the folder from the second WFE to the problem WFE and run IISReset. If for any reason you are still having issues, you can disconnect from the farm / configdb and then reconnect to the farm / configdb and all of the WebApps will be redeployed, sites rebuilt etc... However, I don't know what version of SharePoint you are running, if you are running SharePoint 2007 this should be all you have to do...

    Disconnect from Farm

    psconfig -cmd configdb -disconnect

    Reconnect to Farm

    psconfig -cmd configdb -connect -server SQLServerName -database SharePoint_ConfigDB
    psconfig -cmd services install
    psconfig -cmd installfeatures
    psconfig -cmd secureresources

    Cheers,

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders, Business Intelligence in SharePoint 2013.


    • Edited by Ivan Sanders Wednesday, January 23, 2013 9:53 PM
    • Proposed as answer by Paul Turner _ Monday, January 28, 2013 5:00 PM
    • Marked as answer by Emir Liu Thursday, January 31, 2013 6:46 AM
    Wednesday, January 23, 2013 9:52 PM

All replies

  • Hi KK,

    First drain stop or move the WFE out of NLB rotation, then check to see if the path exists under C:\inetpub\wwwroot\wss\VirtualDirectories\YourWebAppName it will be the same path on your other WFE, if the folder is still there then open Internet Information Services (IIS) Manager > Right Click on the Site > Manage Web Site > Advanced Settings > Physical Path > and browse to the folder and click OK > Then OK again > IISRESET..

    If this is the only issue with the Site, you can copy the folder from the second WFE to the problem WFE and run IISReset. If for any reason you are still having issues, you can disconnect from the farm / configdb and then reconnect to the farm / configdb and all of the WebApps will be redeployed, sites rebuilt etc... However, I don't know what version of SharePoint you are running, if you are running SharePoint 2007 this should be all you have to do...

    Disconnect from Farm

    psconfig -cmd configdb -disconnect

    Reconnect to Farm

    psconfig -cmd configdb -connect -server SQLServerName -database SharePoint_ConfigDB
    psconfig -cmd services install
    psconfig -cmd installfeatures
    psconfig -cmd secureresources

    Cheers,

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders, Business Intelligence in SharePoint 2013.


    • Edited by Ivan Sanders Wednesday, January 23, 2013 9:53 PM
    • Proposed as answer by Paul Turner _ Monday, January 28, 2013 5:00 PM
    • Marked as answer by Emir Liu Thursday, January 31, 2013 6:46 AM
    Wednesday, January 23, 2013 9:52 PM
  • Thanks for the reply. I am using SharePoint 2010 Enterprise. In my case Site is deleted from IIS (i.e. no site in IIS) but there is web app/site folder @ C:\inetpub\wwwroot\wss\VirtualDirectories\YourWebAppName

    Shall I use the same steps given above to disconnect/connect config db to restore it?

    It is production WFE so cautious.

    Please revert.

    Thank you,

    KK

    Saturday, January 26, 2013 3:28 AM
  • Hi KK,

    Yes, that you be the easiest.

    I would rename and mode the current C:\inetpub\wwwroot\wss\VirtualDirectories\YourWebAppName to a /OLD folder. Once you disconnect remove in artifacts if any that have not been removed (AppPool, WebSites, etc) as these may stop the provision process from deploying the IISSites properly...

    Note: Please do not remove the defaults like the Default WebSite, though I would stop the website, or the .NT v2 or v2 Classic Application Pools. If you end up with w IISSite called SITE with a strange icon, just right click and choose remove, if you try to click on it first, you will receive an error "Site Not Found" this happens sometimes when removing a Server from a farm. But not all the time.

    Please let me know how it goes...

    -Ivan


    Ivan Sanders My LinkedIn Profile, My Blog, @iasanders, Business Intelligence in SharePoint 2013.

    Saturday, January 26, 2013 4:24 AM
  • I have created a new VM, deleted sharepoint site from IIS and tried the above commands, it worked except I need to give passphrase while connecting to config db.

    psconfig -cmd configdb -disconnect
    psconfig -cmd configdb -connect -server <<servername>> -database SharePoint_Config -passphrase <<passphrase>>

    Next, I'll be running these commands in production WFE2 where actual issue exists, before that quick ask

    Will there be any impact on App1, App2 and WFE1 when I run these commands on WFE2?
    Any takecare I need to take in App1, App2 or WFE1?

    Thank you,
    KK

    Sunday, February 10, 2013 10:11 PM
  • Thanks, Ivan. I followed your given steps and it worked, Only difference rather than running the psconfig commands I did it running SharePoint product and configuration, disconnected and then connecting server again.

    Once again, Thank you!

    Regards,

    KK

    Friday, March 29, 2013 11:15 PM