Home:ALL Converter>Hosting a dotnet core console application on Linux using Nginx

Hosting a dotnet core console application on Linux using Nginx

Ask Time:2020-11-08T03:53:23         Author:metashogun1596

Json Formatter

I'm trying to host a C# console app in this case a telegrambot using nginx so it can run as a linux service or deamon from my laptop. I've tried to follow this tutorial https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1 and also a very useful youtube video I found. But when I start the service and run a command to check the status it gives me the following message:

$ sudo systemctl status myapp2.service
● myapp2.service - myapp example
     Loaded: loaded (/etc/systemd/system/myapp2.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) since Sat 2020-11-07 13:40:49 CST; 4s ago
    Process: 35260 ExecStart=/usr/bin/dotnet /var/www/myapp2/U21711269BOT.dll (code=exited, status=0/SUCCESS)
   Main PID: 35260 (code=exited, status=0/SUCCESS)

it's not giving me a core dump or any other error message and I've tried to configure the default file for nginx and still gives me the same problem. If anyone knows of a way to solve this issue I would appreciate it. Thanks in advance.

Author:metashogun1596,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/64731787/hosting-a-dotnet-core-console-application-on-linux-using-nginx
yy