0
我在Visual Studio 2012中創建了一個新的MVC 4 Web應用程序。新項目帶有一個默認模板,所以我想嘗試運行它,但我得到了以下錯誤信息:在VS2012中創建新的MVC 4項目後立即出現配置錯誤
Line 247: <providers>
Line 248: <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
Line 249: <add name="MySQLMembershipProvider" type="MySql.Web.Security.MySQLMembershipProvider, MySql.Web, Version=6.7.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" connectionStringName="LocalMySqlServer" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="true" applicationName="/" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
Line 250: </providers>
Line 251: </membership>
Source File: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config\machine.config Line: 249
我試圖尋找在整個解決方案使用CTRL + F關鍵字AspNetSqlMembershipProvider
和MySQLMembershipProvider
,但它說:「文本沒有被發現。」
請注意,我沒有對項目進行任何更改,這是我剛剛創建的一個全新項目。
究竟是什麼問題?
附加信息:此錯誤發生在運行時,錯誤消息顯示在瀏覽器中。 (沒有編譯錯誤)
您收到的實際錯誤信息是什麼?您引用的行通常位於項目根目錄下的web.config文件中。 – Carsten 2014-11-03 14:48:22
原因可能是您的項目引用了MySql成員資格提供程序,但該項目本身沒有對MySql連接程序集的引用 – 2014-11-03 14:48:33
@Aschratt這是錯誤消息。我在這裏複製並粘貼整個錯誤信息。 – 2014-11-03 14:50:39