User-460007017 posted
Hi namwam,
You could compare the application pool identity,loaduserprofile and NTFS permission,ACLS. In addition, try to set the application pool to no managed code.
This link has provided the steps to fix 502.5 error:
https://docs.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x
To host the asp.net core application in the custom website, please ensure you have take all the steps in the link above.
Troubleshooting:+
•Confirm that the application runs locally on Kestrel. A process failure might be the result of a problem within the application. For more information, see Troubleshooting tips.
•Confirm that you didn't set a <PlatformTarget> in your .csproj that conflicts with the RID. For example, don't specify a <PlatformTarget> of x86 and publish with an RID of win10-x64
, either by using dotnet publish -c Release -r win10-x64 or by setting the <RuntimeIdentifiers> in your .csproj to win10-x64
. The project publishes without warning or error but fails with the above logged exceptions on the system.
•If this exception occurs for an Azure Apps deployment when upgrading an application and deploying newer assemblies, manually delete all files from the prior deployment. Lingering incompatible assemblies can result in a System.BadImageFormatException
exception when deploying an upgraded app.
Best Regards,
Yuk Ding