MySQL ASP.net 连接字符串错误

标签 mysql asp.net connection-string

我正在尝试从托管平台上的 asp.net 网站连接到 MySQL。我的连接字符串看起来不错,所有登录详细信息和服务器 IP 均正确,但页面上仍然出现错误:

[Win32Exception (0x80004005): The network path was not found]    
provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

web.config 连接字符串:

<connectionStrings>
<add name="Conn" connectionString="Server=xxxx;Database=xxxx;Uid=xxxx;Pwd=xxxx;" providerName="MySql.Data.MySqlClient"/>
</connectionStrings>

你们能给我更多信息吗?为什么会出现这种情况?谢谢!

最佳答案

您的服务器未运行,或者如果正在运行,您的代码无法访问此服务器 - 防火墙等。或者您没有授予应用程序 IP 的权限。

关于MySQL ASP.net 连接字符串错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42413213/

相关文章:

c# - 围绕这个 C# MySQL 数据访问代码进行事务处理的最佳方法是什么(我需要什么)?

c# - itextsharp 不关心我的 html 样式

asp.net - asp.net 4.0 应用程序中的 Page.GetRouteUrl() 错误。 URL 路由的任何帮助

c# - 字符串 [,] 和中继器

c# - VS2012 表示 ConnectionStrings 部分为 "The configProtectionProvider attribute is not allowed"

sql-server - SQL Server : Modifying the "Application Name" property for auditing purposes

c# - 如何将参数传递给 WCF 数据服务并根据它切换连接字符串?

mysql - 在mysql中运行多个mysql实例

mysql - 如果表行与另一个表行字符串匹配,则获取该表行

mysql查询反向打印