NLog Killing Aspnet Core Application

Awhile back I moved to a new location for storing my server and for the most part things went smoothly. Didn't have any issues with my local DNS or emails, however I did encountered one issue. The issue was Recycled Motors where the application would boot but instantly fail. Which didn't create any logs or errors for me to look. So it took me a few weeks along with everything else going on to figure this one out. I spend a little too much time looking into my network and the bind9 configs because I know it had to do with my configs. Originally I was on a 10.0.10.x network but with the I.P. the modem only allowed the regular 192.168.1.x ip address. Eventually I figured out the issue, being my NLog config itself. I have it writing in a database where I list the ip address explictly.
I completely forget about this since it was just a quick thing I added a few weeks before the move and I still have it pointed to localhost in the appsettings.json

Solutions

  • Use different environment configs in the appsettings.json & nlog.config pull from there.
  • Use different environment configs for nlog.config (probably easy with the first idea)
I'll update this article later with my solution for now it is a ticket in my repo.

NOTES

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql