Windows event log had this error message:
Application '/LM/W3SVC/7/ROOT' with physical root 'C:\inetpub\wwwroot\scwebgroup.com' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.
Go this error message in a dotnet core project. App would run fine in IIS Express and Kestrel but not on IIS proper. After trying many of the suggested solutions on the web, I discovered the issue was being caused by the entry:
<environmentVariable name="APIDISCOVERY_FILEPATH" value="D:\VersaDev.SRS.IdentityServer\VersaDev.SRS.IdentityServer\obj\Debug\net6.0\ApiEndpoints.json" />
in the web.config file. Turns out the failure was down to updating the app to net8.0 which caused a conflict wit this line. Commented out the line and the problem went away.