I am trying to create a service to run by .net application on ubuntu 18.04.
cd /lib/systemd/system/YellowPages.service
[Unit]
Description = Yellow page
There are a couple of issues with your daemon:
[Unit]
Description = Yellow pages .NET service
Remove spaces around equal sign:
[Unit]
Description=Yellow pages .NET service
ExecStart needs an absolute path (hence the error):
[Service]
Type=forking
WorkingDirectory=/home
ExecStart=/usr/bin/dotnet /home/yp_app/YellowPages.dll
Your dotnet executable might be located elsewhere, although you can find out its absolute path by doing:
$ which dotnet
Whatever is returned would be the absolute path to use.