- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我想从我的 asp 页面连接到 mysql 数据库。因此,根据我的托管服务提供商的说法,我使用了连接字符串,其中服务器被指定为“localhost:3309”
Dim myConnection As MySqlConnection = New MySqlConnection("server=localhost:3309; user id=TID; password=TPWD; database=TDB; pooling=false;")
Dim strSQL As String = "SELECT * from Device_Data"
Dim myDataAdapter As MySqlDataAdapter = New MySqlDataAdapter(strSQL, myConnection)
Dim myDataSet As DataSet = New DataSet()
myDataAdapter.Fill(myDataSet, "Device_Data")
MySQLDataGrid.DataSource = myDataSet
MySQLDataGrid.DataBind()
但是当我运行这个页面时我得到了这个错误
[SocketException (0x2af9): No such host is known]
System.Net.Dns.GetAddrInfo(String name) +6134386
System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +136
System.Net.Dns.GetHostEntry(String hostNameOrAddress) +109
MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname) +123
[Exception: Call to GetHostEntry failed after 00:00:02.2499197 while querying for hostname 'localhost:3309': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001.]
MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname) +405
MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout) +457
MySql.Data.MySqlClient.NativeDriver.Open() +215
[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
MySql.Data.MySqlClient.NativeDriver.Open() +283
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +51
MySql.Data.MySqlClient.MySqlConnection.Open() +362
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +123
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +319
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +92
show.form1_Load(Object sender, EventArgs e) in
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Control.LoadRecursive() +146
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
这是服务器问题吗??如果是,那么他们应该如何解决这个问题?当联系服务器人员时,他们说这是我的编码问题。他们是对的吗?
最佳答案
The correct connection string对于 MySQL ADO.NET 连接器是
Server=localhost;Port=3309;Database=Test;Uid=username;Pwd=password;
关于.net - 套接字异常 : No such host is known,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4970177/
016-03-07T09:10:16.992-0600 W NETWORK [HostnameCanonicalizationWorker] Failed to obtain name info f
我有一个工作的 C 程序,其中字符串数组的长度在编译时已知。它是: char array_person_name[3][101]; char person_name[101] = ""; ... st
我正在做一个需要Graph DB 的项目。我正在使用 C# .Net Core 开发项目。我不得不选择 ArangoDB 作为这个项目的 Graph DB。不幸的是,.Net 没有官方驱动程序。这就是
我正在尝试使用 DataContractSerializer 将对象序列化为 Xml。我有以下类(class); [ActiveRecord(Lazy = true)] [KnownType(type
我有: 身份服务器 4, 具有 OpenId Connect 和混合流的 Mvc 应用 WebApi 应用 假设用户已经获得带有 id_token 和访问 token 的 cookie。然后他从 mv
我有: 身份服务器 4, 具有 OpenId Connect 和混合流的 Mvc 应用 WebApi 应用 假设用户已经获得带有 id_token 和访问 token 的 cookie。然后他从 mv
我有一个简单的 Asp.Net Core Azure Web 应用程序,需要向本地 Rest 服务发出 http get 请求。此 Rest 服务托管在 IIS 上,仅针对端口 443 设置了绑定(b
这个问题可能是一个很好回答的问题,但不幸的是我不知道正确的术语来正确地问它,所以...... template class __bit_iterator; 有人可以在这里解释最后一个模板参数吗?我唯
在基于ASP.NET Core 1.1.1开发的VS2017 Ver 15.3.3应用程序中,我使用Account confirmation and password recovery in ASP.
我有一个应用程序(aspnet core app 3.1),在启动期间使用以下代码从 azure blob 存储加载数据: BlobClient client = new BlobClient(loa
我有一个应用程序(aspnet core app 3.1),在启动期间使用以下代码从 azure blob 存储加载数据: BlobClient client = new BlobClient(loa
我想知道如何查询Wikidata通过使用别名(“也称为”)。 现在我正在努力 SELECT ?item WHERE { ?item rdfs:aliases ?alias. FILTER(CONTAI
这是一个 PNG 类,在类文档中列出了两个构造函数,如下所示。 PNG::PNG ( string const & file_name ) Creates a PNG image
这就是我目前拥有的,以及我的教授提供的扫描仪。 #include "Similarity.h" #include "Scanner.h" using namespace std; int Simila
我想从我的 asp 页面连接到 mysql 数据库。因此,根据我的托管服务提供商的说法,我使用了连接字符串,其中服务器被指定为“localhost:3309” Dim myConnection As
我正在尝试集成的第三方应用程序,要求将文件放入 .well-known文件夹。如何使该文件可从 URL 访问? ( example.com/.well-known/token.txt )。站点部署为
尝试学习 Hibernate,我正在尝试学习如何执行 NamedQuries但每次我都会收到 Exception in thread "main" org.hibernate.MappingExcep
我正在尝试将 PWA 发布到 Google Playstore。我被困在数字 Assets 握手中。 这是我的 nginx conf - location /asd/ { default_t
我正在尝试设置 wordpress xml-rpc带 rails : blog = XMLRPC::Client.new("localhost/blog", "/xmlrpc.php", 80) 但是
我在我的 nginx 配置中有这个: location ~ /\. { deny all; } location /.well-known/ { allow all; } 但是我还是不
我是一名优秀的程序员,十分优秀!