mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.84k stars 1.02k forks source link

SocketException in ASP.NET MVC project. #8252

Open Mascasc opened 5 years ago

Mascasc commented 5 years ago

I have recently tried to learn the asp.net mvc framework with MonoDevelop on Ubuntu 18.04.

However, any time I try to connect to a database I get an http 500 SocketException error resulting from a time-out with the database.

I have a tried both the MySql and PostgreSql connections with the Entity framework.

I have also checked the Port 3306 to make sure that port is accessible and I am able to use telnet in my bash terminal, so I know this is not the issue.

My current connectionString configuration is shown below.

 <connectionStrings>
    <add name="connStr" connectionString="server=127.0.0.1;port=3306;database=mvc5;uid=root;password=****" providerName ="MySql.Data.MySqlClient" />       
 </connectionStrings>

Is there something else which needs to be done to access databases with Mono on a Linux platform? I haven't been able to find a similar issue online.

scherenhaenden commented 5 years ago

Could you please provide with versions are you trying? Just by the way... not every version of the Mysql connectors work with EF.

This might help you https://stackoverflow.com/questions/21206184/cant-use-a-mysql-connection-for-entity-framework-6

Pls, remember to close the ticket in case you have found a solution