Failed to Load file or assembly MySql. Web, load mysql. web

Source: Internet
Author: User

Failed to Load file or assembly MySql. Web, load mysql. web

By chance, I encountered this error and found a temporary solution. The real cause is unknown, and I do not know whether this solution will have any side effects in the future.

"/" Indicates a server error in the application.

Configuration Error

Note: An error occurred while processing the configuration file required to provide services to the request. Check the following error details and modify the configuration file as appropriate.

Analyzer error message: failed to Load file or assembly "MySql. Web, Version = 6.7.4.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d" or one of its dependencies. The system cannot find the specified file.
<Add name = "MySQLMembershipProvider" type = "MySql. web. security. mySQLMembershipProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, publicKeyToken = allow "connectionStringName =" LocalMySqlServer "allow =" false "enablePasswordReset =" true "allow =" true "applicationName ="/"requiresUniqueEmail =" false "passwordFormat =" Clear "allow = "5" minRequiredPasswordLength = "7" minRequiredNonalphanumericCharacters = "1" passwordAttemptWindow = "10" passwordStrengthRegularExpression = ""/>

Source error:

Line 241: <add name = "MySQLMembershipProvider" type = "MySql. web. security. mySQLMembershipProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, publicKeyToken = allow "connectionStringName =" LocalMySqlServer "allow =" false "enablePasswordReset =" true "allow =" true "applicationName ="/"requiresUniqueEmail =" false "passwordFormat =" Clear "allow = "5" minRequiredPasswordLength = "7" minRequiredNonalphanumericCharacters = "1" passwordAttemptWindow = "10" passwordStrengthRegularExpression = ""/>

Row 244:<add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
Line 252: <add name = "MySQLRoleProvider" type = "MySql. web. security. mySQLRoleProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "connectionStringName =" LocalMySqlServer "applicationName ="/"/>
Row 253:</providers>

Row 254:</roleManager>   

Source File: C: \ Windows \ Microsoft. NET \ Framework \ v4.0.30319 \ Config \ machine. config

Solution:

Follow the prompts in the source file path to find the corresponding file to open, and then delete the node that reported the error. It is possible that one error may be deleted, and another error will be reported. The deletion will continue until no error is reported.

The following content is the content near my error report. The red part is the two nodes I reported the error. I deleted them one by one, and the. NET MVC project can run normally.

<Membership>
<Providers>
<Add name = "AspNetSqlMembershipProvider" type = "System. web. security. sqlMembershipProvider, System. web, Version = 4.0.0.0, Culture = neutral, publicKeyToken = login "connectionStringName =" LocalSqlServer "Login =" false "enablePasswordReset =" true "Login =" true "applicationName ="/"requiresUniqueEmail =" false "passwordFormat =" Hashed "Login = "5" minRequiredPasswordLength = "7" minRequiredNonalphanumericCharacters = "1" passwordAttemptWindow = "10" passwordStrengthRegularExpression = ""/>
<Add name = "MySQLMembershipProvider" type = "MySql. web. security. mySQLMembershipProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, publicKeyToken = allow "connectionStringName =" LocalMySqlServer "allow =" false "enablePasswordReset =" true "allow =" true "applicationName ="/"requiresUniqueEmail =" false "passwordFormat =" Clear "allow = "5" minRequiredPasswordLength = "7" minRequiredNonalphanumericCharacters = "1" passwordAttemptWindow = "10" passwordStrengthRegularExpression = ""/>
</Providers>
</Membership>
<Profile>
<Providers>
<Add name = "AspNetSqlProfileProvider" connectionStringName = "LocalSqlServer" applicationName = "/" type = "System. web. profile. sqlProfileProvider, System. web, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a "/>
<Add name = "MySQLProfileProvider" type = "MySql. web. profile. mySQLProfileProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "connectionStringName =" LocalMySqlServer "applicationName ="/"/>
</Providers>
</Profile>
<RoleManager>
<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 = "aspnetwindow#enroleprovider" applicationName = "/" type = "System. web. security. window#enroleprovider, System. web, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a "/>
<Add name = "MySQLRoleProvider" type = "MySql. web. security. mySQLRoleProvider, MySql. web, Version = 6.7.4.0, Culture = neutral, PublicKeyToken = c5687fc88969c44d "connectionStringName =" LocalMySqlServer "applicationName ="/"/>
</Providers>
</RoleManager>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.