I developed a test app and published it to Mocha Host successfully last year and all went well.
I’ve now developed a small app and am trying to publish it to Mocha Host, but I keep getting an error messages. My latest is an IIS 502.5 Process Failure.
My app doesn’t appear to even begin…
On my PC, the app compiles without error and runs well.
Any suggestions are appreciated.
Here are some things you can try:
1.Check the Event Viewer / stdout logs on the server
On your MochaHost deployment, go into your published folder.
In web.config, make sure you have logging enabled:
<aspNetCore processPath="dotnet" arguments=".\YourApp.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" />
Create a logs folder in the root with write permissions.
Then try hitting your app again — it should generate a .log file with the real startup error.
2.Check the Target Runtime
Did you publish as Framework-Dependent or Self-Contained?
Shared hosting (like MochaHost) usually does not have .NET runtime pre-installed, or may not have the same version as your dev PC.
To be safe, publish as Self-Contained Deployment:
dotnet publish -c Release -r win-x86 --self-contained true
(or win-x64 depending on host environment)
Then upload the entire publish folder, including all .dlls and .exe.
3.Check for Missing Files
Sometimes FTP doesn’t push all files (especially hidden ones). Re-upload the publish folder fresh.
Make sure web.config is present.
4.Check .NET Version Compatibility
If you built with .NET 8, but MochaHost only supports up to .NET 6 (example), a framework-dependent app won’t run.
Either:
Switch your app’s target to a supported version in csproj.
Or deploy self-contained.
Please login first to submit.