標籤:
今天在瀏覽ASP.NET項目時,提示如下錯誤:
Could not load file or assembly ‘MySql.Web.v20, Version=6.9.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d‘ or one of its dependencies
<providers><add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /><add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web.v20, Version=6.9.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" /></providers>
<add name="MySQLRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web.v20, Version=6.9.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" applicationName="/" />
網上查閱後找到如下解決方案,特此記錄:
原文:
This error occurs when you install MySQL .NET Connector 6.9.4 (probably other versions too) because if you do not uncheck "Web Providers" during the installation it writes in your machine.config which brings you to this error.
譯:安裝MySQL.NET 6.9.4(或者其他版本的)時,如果不取消“Web Providers”選項,便會在安裝過程中修改你的machine.config設定檔,從而導致這個錯誤發生。(小學生英語水平,翻譯不足之處,還請多多見諒^^&)
控制台-添加刪除程式
原文地址:http://stackoverflow.com/questions/26189699/asp-net-mvc4-configuration-error-after-installing-mysql-connector-net
ASP.NET MVC4 with MySQL: Configuration Error (MySql.Web.v20)