C#C
C#4y ago
V3NG3ANC3

Newly hosted .net web app (Linux VPS) not accessing MySqlDatabase

I've just published a .Net web application to a linux VPS, however for some reason, when loading pages that require the database, the website is crashing. I know this is likely due to my database not being connected properly. It works fine on my local machine, just not on the Linux VPS.
Any help would be greatly appreciated!

Here is my appsettings.json (edited out sensitive info):

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "ConnectionStrings": {
    "DefaultConnection": "Persist Security Info=False;Server=sql1.hosting.net;User ID=Website;Password=Password;Initial Catalog=myDatabase;MultipleActiveResultSets=true",
    }
}
Was this page helpful?