I am facing a parsing error of web.config while run the my asp.net application in server. The error is following:
Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Source Error:
<providers>
<clear/>
<add connectionStringName="LocalMySqlServer" applicationName="/" name="MySqlRoleProvider" type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.6.4.0, Culture=neutral, PublicKeyToken=C5687FC88969C44D"/>
</providers>
</roleManager>
您的网站似乎正在尝试连接到LocalMySqlServer
连接字符串中引用的MySQL Server实例,并且失败了-该服务器的详细信息是否已在环境中正确配置,并且Web服务器可以正确地与其通信吗?
Like Zhaph has stated, there could be something wrong with your connection string settings. Should look something like this in your Web.config:
<connectionStrings>
<add name="DefaultConnection" connectionString="server=localhost;User Id=root; password=password;Persist Security Info=True;database=aspmysql"
providerName="MySql.Data.MySqlClient" />
</connectionStrings>
and then:
<roleManager enabled="true" defaultProvider="MySqlRoleProvider">
<providers>
<clear />
<add connectionStringName="DefaultConnection"
applicationName="/" name="MySqlRoleProvider"
type="MySql.Web.Security.MySQLRoleProvider, MySql.Web, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
autogenerateschema="true" />
</providers>
</roleManager>
Take a look at this to see if it may help you connect your ASP application to MySql.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.