So, I am trying to run a query using SQLDataSource on VS with MYSQL, and whatever the query is, I get the same error which is Object reference not set to an instance of an object.
The SQLDataSource is already connected to the database, so there is nothing wrong with my connection string.
Web.config
<?xml version="1.0"?>
<configuration>
<connectionStrings>
<add name="helbotelConnectionString" connectionString="Data Source=localhost;port=3306;Initial Catalog=helbotel;User Id=root;password=MYPASSWORD"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
<system.web>
<compilation debug="false" targetFramework="4.0">
<assemblies>
<add assembly="MySql.Data, Version=6.10.5.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</assemblies>
</compilation>
</system.web>
</configuration>
SQLDataSource
<asp:SqlDataSource ID="sqlNews" runat="server" ConnectionString="<%$ ConnectionStrings:helbotelConnectionString %>" ProviderName="<%$ ConnectionStrings:helbotelConnectionString.ProviderName %>" SelectCommand="SELECT * from users"></asp:SqlDataSource>
Error Page
Error page screenshot
P.S: I already use mysql connections from backcode and they work perfectly but this problem only occurs with SQLDataSource (I need it for GridView)