You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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:
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:
(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.
You need to open the terminal in Visual Studio. You can do this by going to “View” on the top menubar, then “Terminal”. Then type the command in the terminal and hit enter.
Also note that if you’re targeting multiple frameworks (ie net 8 and net 48) you’ll need to specify which framework to build for.
Here’s an example with net48: dotnet publish -c Release -r win-x86 -f net48 –self-contained true
Here’s an example with net 8: dotnet publish -c Release -r win-x86 -f net8.0 –self-contained true
Activity
itg-assistant commentedon Jun 16, 2026
Julie (ITG) answered 2025-10-03 13:57:08 UTC
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:
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:
(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.
itg-assistant commentedon Jun 16, 2026
Rusty Elston answered 2025-10-06 12:43:05 UTC
how do I execute your suggestion:
dotnet publish -c Release -r win-x86 --self-contained true
?
itg-assistant commentedon Jun 16, 2026
Julie (ITG) answered 2025-10-06 13:39:51 UTC
You need to open the terminal in Visual Studio. You can do this by going to “View” on the top menubar, then “Terminal”. Then type the command in the terminal and hit enter.
itg-assistant commentedon Jun 16, 2026
Julie (ITG) answered 2025-10-06 13:47:00 UTC
Also note that if you’re targeting multiple frameworks (ie net 8 and net 48) you’ll need to specify which framework to build for.
Here’s an example with net48: dotnet publish -c Release -r win-x86 -f net48 –self-contained true
Here’s an example with net 8: dotnet publish -c Release -r win-x86 -f net8.0 –self-contained true