How to Setup a remote Blazor server on Ubuntu
Hey all,
I'm working on a project and I'm getting overwhelmed with the options and need some guidance. I'm developing a Blazor project on my windows pc and trying to host it on an Ubuntu pc/server. It sometimes works, but I can't seem to get it to run as a service on the server. To help troubleshoot, I want to remotely attach to the process, but it's not being detected.
Right now, I'm publishing to folder (debug as opposed to release) and uploading the files to /var/project. I'd like to attach to the process at the very start, but I can't find how. Ideally, I'd like to be able to start debugging on my windows pc, but run on the Linux to see why it's failing.
Failing that, what would be a good setup for this? Should I explore docker instead?
4 Replies
How are you running it as a service? systemd unit?
@Saiyanslayer
Systemctl
So systemd.
Show the unit file you wrote.
I've changed it now to match a tutorial i was following:
I reloaded the service and restart the service, get this response:
but if i go to /var/www/patienttracker/ and use: it runs
and if i use VS2022 and try to "Attach to Process", I can't see the process on the list
there is a "BlazorPatients.pdb" file in the folder
and the publish configuration is Debug