63 lines
2.8 KiB
Batchfile
63 lines
2.8 KiB
Batchfile
|
|
@echo off
|
||
|
|
REM Diagnose IIS Configuration Issues
|
||
|
|
REM Run as Administrator
|
||
|
|
|
||
|
|
echo ========================================
|
||
|
|
echo IIS DIAGNOSTICS FOR POZO APP
|
||
|
|
echo ========================================
|
||
|
|
echo.
|
||
|
|
|
||
|
|
cd /d "%~dp0"
|
||
|
|
|
||
|
|
echo [1/6] Checking website configuration...
|
||
|
|
powershell -Command "Import-Module WebAdministration; $site = Get-Website -Name 'PozoApp' -ErrorAction SilentlyContinue; if ($site) { Write-Host '[OK] Website PozoApp exists'; Write-Host ' Physical Path:' $site.physicalPath; Write-Host ' State:' (Get-WebsiteState -Name 'PozoApp').Value; Write-Host ' Bindings:' $site.bindings.Collection[0].bindingInformation } else { Write-Host '[ERROR] Website PozoApp not found!' }"
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo [2/6] Checking application pool...
|
||
|
|
powershell -Command "Import-Module WebAdministration; $pool = Get-WebAppPoolState -Name 'PozoApp' -ErrorAction SilentlyContinue; if ($pool) { Write-Host '[OK] Application Pool PozoApp exists'; Write-Host ' State:' $pool.Value } else { Write-Host '[ERROR] Application Pool PozoApp not found!' }"
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo [3/6] Checking web.config...
|
||
|
|
if exist "dist\web.config" (
|
||
|
|
echo [OK] web.config exists
|
||
|
|
echo [INFO] Checking web.config content...
|
||
|
|
findstr /C:"iisnode" "dist\web.config" >nul 2>&1
|
||
|
|
if %errorLevel% equ 0 (
|
||
|
|
echo [OK] web.config contains iisnode configuration
|
||
|
|
) else (
|
||
|
|
echo [WARNING] web.config does not contain iisnode configuration
|
||
|
|
)
|
||
|
|
) else (
|
||
|
|
echo [ERROR] web.config NOT FOUND in dist folder!
|
||
|
|
)
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo [4/6] Checking server.js...
|
||
|
|
if exist "dist\server.js" (
|
||
|
|
echo [OK] server.js exists
|
||
|
|
) else (
|
||
|
|
echo [ERROR] server.js NOT FOUND in dist folder!
|
||
|
|
)
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo [5/6] Checking handlers unlock status...
|
||
|
|
powershell -Command "Import-Module WebAdministration; try { $handlers = Get-WebConfiguration -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/handlers' -ErrorAction Stop; Write-Host '[INFO] Handlers section accessible' } catch { Write-Host '[WARNING] Cannot access handlers section - may be locked' }"
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo [6/6] Checking iisnode module...
|
||
|
|
powershell -Command "Import-Module WebAdministration; $module = Get-WebGlobalModule | Where-Object { $_.Name -eq 'iisnode' } -ErrorAction SilentlyContinue; if ($module) { Write-Host '[OK] iisnode module is registered'; Write-Host ' Image:' $module.Image } else { Write-Host '[ERROR] iisnode module NOT FOUND!' ; Write-Host '[INFO] Please install iisnode from: https://github.com/Azure/iisnode/releases' }"
|
||
|
|
|
||
|
|
echo.
|
||
|
|
echo ========================================
|
||
|
|
echo DIAGNOSTICS COMPLETE
|
||
|
|
echo ========================================
|
||
|
|
echo.
|
||
|
|
echo Common Issues:
|
||
|
|
echo 1. If handlers locked: Run UNLOCK-IIS-HANDLERS.bat
|
||
|
|
echo 2. If website not found: Run SETUP-IIS.bat
|
||
|
|
echo 3. If iisnode not found: Install iisnode module
|
||
|
|
echo 4. If default IIS page shows: Check website physical path
|
||
|
|
echo.
|
||
|
|
pause
|
||
|
|
|