Server Error in '/Agent' Application.

No connection could be made because the target machine actively refused it 127.0.0.1:3306

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:3306

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[SocketException (0x274d): No connection could be made because the target machine actively refused it 127.0.0.1:3306]
   System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) +7995504
   System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) +95
   System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) +68
   System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization) +83

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4593189
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +13992992
   MySql.Data.Common.StreamCreator.GetTcpStream(MySqlConnectionStringBuilder settings) +481
   MySql.Data.MySqlClient.NativeDriver.Open() +95

[MySqlException (0x80004005): Unable to connect to any of the specified MySQL hosts.]
   MySql.Data.MySqlClient.NativeDriver.Open() +1768
   MySql.Data.MySqlClient.Driver.Open() +63
   MySql.Data.MySqlClient.Driver.Create(MySqlConnectionStringBuilder settings) +329
   MySql.Data.MySqlClient.MySqlPool.CreateNewPooledConnection() +18
   MySql.Data.MySqlClient.MySqlPool.GetPooledConnection() +300
   MySql.Data.MySqlClient.MySqlPool.TryToGetDriver() +151
   MySql.Data.MySqlClient.MySqlPool.GetConnection() +60
   MySql.Data.MySqlClient.MySqlConnection.Open() +2136
   Agent.Site.Page_Load(Object sender, EventArgs e) in E:\WorkSpace\Agent\Site.Master.cs:19
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4261.0