相关文章推荐
傻傻的帽子  ·  Ansible ad-hoc ...·  5 月前    · 
快乐的小熊猫  ·  c# ...·  5 月前    · 
"A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"
my connection string for connecting online mysql database is
MySqlConnection conn = new MySqlConnection
("Server=119.18.57.14; port=8443 ;UserId=medsoftn_webadmin;Password=ycmou786;Database=medsoftn_cms;");
Im i giving wrong port no for connecting mysql database
stack trace is
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond] System.Net.Sockets.Socket.Receive( Byte [] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +6508807 System.Net.Sockets.NetworkStream.Read( Byte [] buffer, Int32 offset, Int32 size) +130 [IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.] System.Net.Sockets.NetworkStream.Read( Byte [] buffer, Int32 offset, Int32 size) +296 MySql.Data.Common.MyNetworkStream.Read( Byte [] buffer, Int32 offset, Int32 count) +47 [TimeoutException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.] MySql.Data.Common.MyNetworkStream.Read( Byte [] buffer, Int32 offset, Int32 count) +465899 MySql.Data.MySqlClient.TimedStream.Read( Byte [] buffer, Int32 offset, Int32 count) +127 System.IO.BufferedStream.Read( Byte [] array, Int32 offset, Int32 count) +262 MySql.Data.MySqlClient.MySqlStream.ReadFully(Stream stream, Byte [] buffer, Int32 offset, Int32 count) +42 MySql.Data.MySqlClient.MySqlStream.LoadPacket() +63 MySql.Data.MySqlClient.MySqlStream.ReadPacket() +31 MySql.Data.MySqlClient.NativeDriver.Open() +241 MySql.Data.MySqlClient.Driver.Open() +22 MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +250 MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +285 MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +91 MySql.Data.MySqlClient.MySqlPool.GetConnection() +67 MySql.Data.MySqlClient.MySqlConnection.Open() +565 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +316 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88 CityMaster.DataBind() in c:\new\BuzyDoctor\CityMaster.aspx.cs:125 CityMaster.Page_Load( Object sender, EventArgs e) in c:\new\BuzyDoctor\CityMaster.aspx.cs:27 System.Web.Util.CalliEventHandlerDelegateProxy.Callback( Object sender, EventArgs e) +51 System.Web.UI.Control.OnLoad(EventArgs e) +92 System.Web.UI.Control.LoadRecursive() +54 System.Web.UI.Page.ProcessRequestMain( Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772 1.This error could occur because either the firewall on the server has refused the connection or the server is not configured to accept remote connections.
2.To fix it you should check first your SQL Server settings in order to allow remote connection, and after that the firewall from the server (where SQL Seerver is installed).
  • Read the question carefully.
  • Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  • If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  • Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid.
  •