Connection Error when Upgrading (v2016)

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
Usman Khan
User
Posts: 7

Connection Error when Upgrading (v2016)

Post by Usman Khan »

I'm upgrading project made with asp.net 8 with asp.net maker 2016 using same mysql odbc connection settings
project works fine when i generate code with asp.net 8, but when I open project with 2016 version and generate code
it gives following error when i browse site

An unhandled exception has occurred: Exception has been thrown by the target of an invocation.
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: Keyword not supported.
Parameter name: dsn
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.GetOption(String key)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder.set_Item(String keyword, Object value)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnectionStringBuilder..ctor(String connStr)
at MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value)
--- End of inner exception stack trace ---


Usman Khan
User
Posts: 7

Post by Usman Khan »

Does ASP.NEt Maker 2016 support mysql ODBC for connection?


motfs
User
Posts: 258

Post by motfs »

Do you use Direct Connection for MySQL? You may output the connection string to verify. Read Server Events and Client Scripts -> Database_Connecting (Example 1) in help file for more detail.


motfs
User
Posts: 258

Post by motfs »

Use Connector/Net included in the template, not ODBC.

It should be fine to connect to MySQL database. Read Database Setup -> 3. MySQL in help file for more detail.


Post Reply