Environment: Windows Server 2012 SharePoint 2013 IIS 8
I have deployed the Sharepoint 2013 site in the App server(Windows 2012). We have seperate DB server.
My site was working fine.
Until I ran the vbs script given by Security team, inorder to harden the IIS.
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Set objShell = WScript.CreateObject("WScript.Shell")
' 1.1: Ensure Web Content Is on Non-System Partition
WScript.Echo "# 1.1: Ensure Web Content Is on Non-System Partition" & vbCrLf
Set objExec = objShell.Exec("%systemroot%\system32\inetsrv\appcmd list vdir")
Do
line = objExec.StdOut.ReadLine()
If InStr(line, "%SystemDrive%\inetpub\wwwroot") Then
WScript.Echo "* Please remove this web site: " & line
End If
Loop While Not objExec.Stdout.atEndOfStream
WScript.Echo vbcrlf & "-------------------------------------------------------------" & vbCrLf
' 1.2: Require Host Headers on all Sites
WScript.Echo "# 1.2: Require Host Headers on all Sites" & vbCrLf
Set objExec = objShell.Exec("%systemroot%\system32\inetsrv\appcmd list sites")
Do
line = objExec.StdOut.ReadLine()
tmpArray = Split(line, ",")
'Wscript.Echo "tmpArray:" & tmpArray(1)
tmpArray2 = Split(tmpArray(1), ":")
'Wscript.Echo "tmpArray2:" & tmpArray2(3)
If Trim(tmpArray2(3)) = "" Then
WScript.Echo "* Please configure Host Header for this web site: " & line
End If
's = s & line & vbcrlf
Loop While Not objExec.Stdout.atEndOfStream
'WScript.Echo s
WScript.Echo vbcrlf & "-------------------------------------------------------------" & vbCrLf
' 1.3 - Disable Directory Browsing
WScript.Echo "# 1.3: Disable Directory Browsing" & vbCrLf
Script ran successfully, but All of the Sharepoint Sites are not accessible now. :(
Its just HTTP 404 not found error. (Even Central Admin)
I checked in the IIS, the sites are just running fine. I tried the urls (_layouts/15/settings.aspx), Nope..
I tried looking into event viewer, Sharepoint Logs. No clue :(
Any one faced similar problem. Can help to resolve this issue ?
Update: After Allowing unknown file extension. 404 gone, But when I reloaded the Central admin it becomes like below (MISSING CSS & IMAGES)