“/”应用程序中的服务器错误。
--------------------------------------------------------------------------------
不知道这样的主机。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Net.Sockets.SocketException: 不知道这样的主机。
[SocketException (0x2af9): 不知道这样的主机。]
System.Net.Dns.GetAddrInfo(String name) +471
System.Net.Dns.InternalGetHostByName(String hostName, Boolean includeIPv6) +121
System.Net.Dns.GetHostEntry(String hostNameOrAddress) +109
MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname) +81
[Exception: Call to GetHostEntry failed after 00:00:00 while querying for hostname 'ljy': SocketErrorCode=HostNotFound, ErrorCode=11001, NativeErrorCode=11001.]
MySql.Data.Common.StreamCreator.GetDnsHostEntry(String hostname) +363
MySql.Data.Common.StreamCreator.GetHostEntry(String hostname) +36
MySql.Data.Common.StreamCreator.GetStreamFromHost(String pipeName, String hostName, UInt32 timeout) +73
MySql.Data.Common.StreamCreator.GetStream(UInt32 timeout) +256
MySql.Data.MySqlClient.NativeDriver.Open() +265
[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
MySql.Data.MySqlClient.NativeDriver.Open() +330
MySql.Data.MySqlClient.Driver.Open() +69
MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +192
MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +11
MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +257
MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +117
MySql.Data.MySqlClient.MySqlPool.GetConnection() +113
MySql.Data.MySqlClient.MySqlConnection.Open() +325
DB.SQLHelper.ExecuteDataTable(String cmdTxt, CommandType cmdType, SqlParameter[] prms) in E:\greensos\DB\SQLHelper.cs:52
DAL.lmglDAL.Searchlmglnextlevel(String lmbh, Int32 length, Int32 num) in E:\greensos\DAL\lmglDAL.cs:36
BLL.lmglBLL.Searchlmglnext(String lmbh, Int32 length, Int32 num) in E:\greensos\BLL\lmglBLL.cs:16
[TargetInvocationException: 调用的目标发生了异常。]
System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0
System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +71
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +261
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29
System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +488
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1247
System.Web.UI.WebControls.BaseDataList.GetData() +38
System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +153
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +54
System.Web.UI.WebControls.BaseDataList.DataBind() +55
System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +60
System.Web.UI.WebControls.BaseDataList.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +44
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Control.PreRenderRecursiveInternal() +171
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
6 个解决方案
#1
就是没连接上 主机没找到呗
#2
Data Source=server; Database=mydb; User ID=username; Password=pwd; Command Logging=false"
using eInfoDesigns.dbProvider.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "";
oMySqlConn.Open
连接字符串看http://www.connectionstrings.com/mysql
using eInfoDesigns.dbProvider.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "";
oMySqlConn.Open
连接字符串看http://www.connectionstrings.com/mysql
#3
这是连接串
<add name="greensos" connectionString="Server=.;Data Source=ljy;User ID=root;Password=ljy123456;"/>
这是dbhelper
public static DataTable ExecuteDataTable(string cmdTxt, CommandType cmdType, params SqlParameter[] prms)
{
DataTable dt = new DataTable();
try
{
MySqlConnection conn = new MySqlConnection(strconn);
conn.Open();
//MySqlCommand cmdcmd = new MySqlCommand("set names gbk", conn);
//cmdcmd.ExecuteNonQuery();
MySqlDataAdapter msda = new MySqlDataAdapter(cmdTxt, conn);
msda.SelectCommand.CommandType = cmdType;
if (prms != null)
{
foreach (SqlParameter prm in prms)
{
msda.SelectCommand.Parameters.Add(prm);
}
}
msda.Fill(dt);
conn.Clone();
}
catch (Exception)
{
throw;
}
return dt;
}
<add name="greensos" connectionString="Server=.;Data Source=ljy;User ID=root;Password=ljy123456;"/>
这是dbhelper
public static DataTable ExecuteDataTable(string cmdTxt, CommandType cmdType, params SqlParameter[] prms)
{
DataTable dt = new DataTable();
try
{
MySqlConnection conn = new MySqlConnection(strconn);
conn.Open();
//MySqlCommand cmdcmd = new MySqlCommand("set names gbk", conn);
//cmdcmd.ExecuteNonQuery();
MySqlDataAdapter msda = new MySqlDataAdapter(cmdTxt, conn);
msda.SelectCommand.CommandType = cmdType;
if (prms != null)
{
foreach (SqlParameter prm in prms)
{
msda.SelectCommand.Parameters.Add(prm);
}
}
msda.Fill(dt);
conn.Clone();
}
catch (Exception)
{
throw;
}
return dt;
}
#4
主机 'ljy' 没找到
换成IP试试
换成IP试试
#5
访问的时候用的
www.xx.cn:8088
ip:8088
里昂个都用了一个效果, 我的连库串没问题吧,因为之前用的drivercs.dll的驱动没问题,但是速度超级慢,然后我修改了mysql的my.ini文件 加了两句禁用dns反向解析的代码,但是现在已经删了,也重启mysql服务了。用这个新的dll想看看速度能不能提高,那个太慢了,没法接受。结果这个车了这个问题。
www.xx.cn:8088
ip:8088
里昂个都用了一个效果, 我的连库串没问题吧,因为之前用的drivercs.dll的驱动没问题,但是速度超级慢,然后我修改了mysql的my.ini文件 加了两句禁用dns反向解析的代码,但是现在已经删了,也重启mysql服务了。用这个新的dll想看看速度能不能提高,那个太慢了,没法接受。结果这个车了这个问题。
#6
端口不是这么用的 中间用逗号试试
www.xx.cn,8088
#1
就是没连接上 主机没找到呗
#2
Data Source=server; Database=mydb; User ID=username; Password=pwd; Command Logging=false"
using eInfoDesigns.dbProvider.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "";
oMySqlConn.Open
连接字符串看http://www.connectionstrings.com/mysql
using eInfoDesigns.dbProvider.MySqlClient;
MySqlConnection oMySqlConn = new MySqlConnection();
oMySqlConn.ConnectionString = "";
oMySqlConn.Open
连接字符串看http://www.connectionstrings.com/mysql
#3
这是连接串
<add name="greensos" connectionString="Server=.;Data Source=ljy;User ID=root;Password=ljy123456;"/>
这是dbhelper
public static DataTable ExecuteDataTable(string cmdTxt, CommandType cmdType, params SqlParameter[] prms)
{
DataTable dt = new DataTable();
try
{
MySqlConnection conn = new MySqlConnection(strconn);
conn.Open();
//MySqlCommand cmdcmd = new MySqlCommand("set names gbk", conn);
//cmdcmd.ExecuteNonQuery();
MySqlDataAdapter msda = new MySqlDataAdapter(cmdTxt, conn);
msda.SelectCommand.CommandType = cmdType;
if (prms != null)
{
foreach (SqlParameter prm in prms)
{
msda.SelectCommand.Parameters.Add(prm);
}
}
msda.Fill(dt);
conn.Clone();
}
catch (Exception)
{
throw;
}
return dt;
}
<add name="greensos" connectionString="Server=.;Data Source=ljy;User ID=root;Password=ljy123456;"/>
这是dbhelper
public static DataTable ExecuteDataTable(string cmdTxt, CommandType cmdType, params SqlParameter[] prms)
{
DataTable dt = new DataTable();
try
{
MySqlConnection conn = new MySqlConnection(strconn);
conn.Open();
//MySqlCommand cmdcmd = new MySqlCommand("set names gbk", conn);
//cmdcmd.ExecuteNonQuery();
MySqlDataAdapter msda = new MySqlDataAdapter(cmdTxt, conn);
msda.SelectCommand.CommandType = cmdType;
if (prms != null)
{
foreach (SqlParameter prm in prms)
{
msda.SelectCommand.Parameters.Add(prm);
}
}
msda.Fill(dt);
conn.Clone();
}
catch (Exception)
{
throw;
}
return dt;
}
#4
主机 'ljy' 没找到
换成IP试试
换成IP试试
#5
访问的时候用的
www.xx.cn:8088
ip:8088
里昂个都用了一个效果, 我的连库串没问题吧,因为之前用的drivercs.dll的驱动没问题,但是速度超级慢,然后我修改了mysql的my.ini文件 加了两句禁用dns反向解析的代码,但是现在已经删了,也重启mysql服务了。用这个新的dll想看看速度能不能提高,那个太慢了,没法接受。结果这个车了这个问题。
www.xx.cn:8088
ip:8088
里昂个都用了一个效果, 我的连库串没问题吧,因为之前用的drivercs.dll的驱动没问题,但是速度超级慢,然后我修改了mysql的my.ini文件 加了两句禁用dns反向解析的代码,但是现在已经删了,也重启mysql服务了。用这个新的dll想看看速度能不能提高,那个太慢了,没法接受。结果这个车了这个问题。
#6
端口不是这么用的 中间用逗号试试
www.xx.cn,8088