I have programmed a very basic API using ASP.NET Core 6.0 and using Entity Framework Core I am trying to communicate with one of my SQL Server databases to access a table.
When I run my IIS Express profile locally on my machine, the API endpoint works and I'm able to retrieve back JSON. But when I publish it to my IIS Server and configure it appropriately I try hitting the same endpoint, I get an HTTP 500 internal server error instead.
I don't really have experience with server management so it leads me to believe it's a server configuration error.
I have tried various troubleshooting methods like deleting the website and uploading it again, changing the application pool and the port number, I made sure the database connection I'm using to speak to the SQL Server, the credentials I'm using has access to read and write to the database and it works perfectly fine locally.