0

I am working with an ASP.NET API and MySQL connection. Everything is fine in local environment. However when I deploy the app on an AWS EC2 IIS Instance and trying to access an endpoint of my application, I got as a son response 'An error has occurred.' instead of my data with a 500 error code from server.

enter image description here

I have connected MySQL with Entity framework. Mysql server is hosted on Amazon AWS.

I did published the project with web deploy from Visual Studio. Is there any way for database to be published wrong so this is the error?

Any help would be great. Let me know If I need to add more info.

I have seen this post without any luck: Deploying website: 500 - Internal server error

Thanks in advance.

UPDATE

After some tries I stepped into this:

enter image description here

George Vardikos
  • 2,345
  • 1
  • 14
  • 25

1 Answers1

1

It might be MySQL server restricts a connection from IP address which is not in a whitelist. I know Azure SQL allows to connect from restricted range of addresses only.

Eugene
  • 106
  • 3