DetailPage-MSS-KB

Microsoft small business knowledge base

Article ID: 2828269 - Last Review: April 3, 2013 - Revision: 6.0

Symptoms

When you run the SFC (system file checker) command together with the /scannow option in Windows Server 2012 Essentials, the Remote Web Access feature may break. 

Additionally, the web configuration file may become corrupted. Specifically, the string "%SBSPRODUCTBINPLACEHOLDER%" is displayed in the Web.config file in the following folder:
X:\Program Files\Windows Server\Bin\WebApps\Site

Note In this folder name, the placeholder X represents the label for the system volume.

Cause

When you run the SFC command together with the /scannow option, some critical changes that were applied during the server installation could revert.

Resolution

To resolve this issue, run the following Windows PowerShell commands as an administrator. Run each command separately and in the following order:
  1. $BinDir = [System.Environment]::ExpandEnvironmentVariables("%programfiles%\windows server\bin")
  2. $WebDir = [System.Environment]::ExpandEnvironmentVariables("%programfiles%\windows server\bin\WebApps")
  3. $WebDir = get-childitem $WebDir –recurse
  4. $List = $WebDir | where {$_.name -eq "web.config"}
  5. foreach($listItem in $List){ if($listItem.DirectoryName -match "MacWebService") {continue;} ($a= Get-Content $listItem.FullName); $a = $a -replace "%SBSPRODUCTBINPLACEHOLDER%", $BinDir; remove-item $listItem.FullName; $f = [io.path]::Combine($listItem.DirectoryName, "Web.config"); $a >> $f}

Applies to
  • Windows Server 2012 Essentials
Keywords: 
KB2828269
Share
Additional support options
Ask The Microsoft Small Business Support Community
Contact Microsoft Small Business Support
Find Microsoft Small Business Support Certified Partner
Find a Microsoft Store For In-Person Small Business Support