Hello Freerk Duursma,
On Windows Server 2025 the built‑in ASP.NET event source either isn’t registered correctly or the default ApplicationPoolIdentity no longer has rights to write to the Application log, so you get the 0x80070057 invalid parameter error when the EventLogWebEventProvider fires. You can restore full logging in a few minutes:
I) Re‑register ASP.NET’s event source
# ensure IIS‑ASP.NET45 is enabled, then:
dism /online /enable-feature /featurename:IIS-ASPNET45 /all
& "$env:windir\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe" -i
# or simply:
New-EventLog –LogName Application –Source "ASP.NET 4.0.30319.0"
II) Grant your AppPool identity write ACLs on the log file and registry
# replace DefaultAppPool with your pool name if different
$appPool = "IIS APPPOOL\DefaultAppPool"
# EVTX file ACL
$logFile = "$env:windir\System32\winevt\Logs\Application.evtx"
$acl = Get-Acl $logFile
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule($appPool, "Write","Allow")
$acl.AddAccessRule($rule); Set-Acl $logFile $acl
# Registry ACL
$regKey = "HKLM:\SYSTEM\CurrentControlSet\Services\EventLog\Application"
$acl = Get-Acl $regKey
$rule = New-Object System.Security.AccessControl.RegistryAccessRule($appPool,"SetValue,WriteKey","Allow")
$acl.AddAccessRule($rule); Set-Acl $regKey $acl
III) Recycle your AppPool (or IIS) and repro
You should now see the full exception and stack trace in the Application log.
Workaround: If you’re still blocked, you can switch to the file‑based provider in your web.config to write errors to disk via System.Web.Management.FileWebEventProvider until a Server 2025 patch ships.
I hope this helps.
Finn