When I try to access my database in a real web application, I get an error message:
Server error in application "/".
Configuration error
Description. An error occurred while processing the configuration file needed to service this request. Please view the specific error details below and modify the configuration file accordingly.
Parser Error Message: Unrecognized attribute name.
Source Error:
An application error has occurred on the server. The current user configuration error for this application prevents the details of the application error when viewing remotely (for security reasons). This could, however, view browsers running on the local server.
Source file: C: \ home \ site \ wwwroot \ web.config Line: 115
My web configuration where line 115 is located:
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
<parameters>
<parameter value="mssqllocaldb" />
</parameters>
</defaultConnectionFactory>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
<provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"></provider>
</providers>
</entityFramework>
<system.data>
<DbProviderFactories>
<remove invariant="MySql.Data.MySqlClient" name="MySQL Data Provider" /> // Line: 115
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.9.9.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" />
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /></DbProviderFactories>
</system.data>
When I delete: name="MySQL Data Provider"from this line, I just get one more error and move around in a circle.
Also, when I refresh the page and delete this part name, I get:
Could not find the requested .Net Framework data provider. It may not be installed.
Any help is greatly appreciated.