After the long battle, I've finally hosted my web API on Raspberry Pi 3b with Ubuntu 16.04 (Ubuntu Mate) OS but with lots of workarounds. One of which bothers me a lot and is about the connection string.
Setup:
- Web Api hosted on RPi
- Web Api is using EntityFrameworkCore SQL Server
- SQL Server Express DB server on Windows 10
- netcoreapp2 published for ubuntu.16.04-arm on Windows
Original connection string that works on Windows but not on Ubuntu:
"Server=MyHostName\\SQLEXPRESS,1433;Database=MyDb;User Id=sa;Password=MyPassword;"
Connection string that works on Ubuntu
"Server=192.168.254.150;Database=MyDb;User Id=sa;Password=MyPassword;"
Is there any way that I can make this work without relying on my Windows' IP address?
I understand these are fairly new releases so I've somehow settled on setting a static IP address crossing my fingers for it to not cause problems on the foreseeable future.