@model PowderCoating.Web.Controllers.DiagnosticsInfo @{ ViewData["Title"] = "System Diagnostics"; ViewData["PageIcon"] = "bi-activity"; }
Observability
Application Information
Current Time: @Model.CurrentTime.ToString("yyyy-MM-dd HH:mm:ss")
Environment: @Model.EnvironmentName
Application Path: @Model.ApplicationPath
Running As: @Model.UserIdentity
Permissions Check
Can Write to App Path: @if (Model.CanWriteToAppPath) { ✓ YES } else { ✗ NO - PERMISSION ISSUE }
Logs Directory Exists: @if (Model.LogsDirectoryExists) { ✓ YES } else { ✗ NO }
Can Write to Logs: @if (Model.CanWriteToLogsPath) { ✓ YES } else { ✗ NO - PERMISSION ISSUE }
Logs Path: @Model.LogsPath
Logging Test

Status: @if (Model.LoggingTestSuccess) { SUCCESS } else { FAILED }

Message: @Model.LoggingTestMessage

@if (Model.LoggingTestSuccess) {
A test log entry was written. Check the log files below to see if it appears.
}
Log Files
View Logs
@if (Model.LogFilesError != null) {
Error reading log files: @Model.LogFilesError
} else if (Model.LogFiles.Any()) { @foreach (var file in Model.LogFiles) { }
File Name Size Last Modified Full Path
@file.Name @(file.Size / 1024.0).ToString("N2") KB @file.LastModified.ToString("yyyy-MM-dd HH:mm:ss") @file.FullPath
} else {
No log files found!

This means logs are not being written. Check the permissions above.

}
Troubleshooting Tips
  • If "Can Write to Logs" shows NO, the IIS Application Pool doesn't have write permissions
  • Grant "Modify" permissions to IIS AppPool\YourAppPoolName on the application folder
  • After fixing permissions, restart the Application Pool in IIS Manager
  • Refresh this page to see if log files appear