System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine

Hello, I got this error today in an Application.  This app is coded in asp.net 2, using VB.  I have the Andri Code (http://makoto.madmedia.ca/2007/03/mysql-membership-and-role-provider-for.html) to connect asp.net with mysql. It has never caused errors in the past, I have the same configuration on another app that has been running for several months with no problem.

This app is new (1 week) and today is the first day I see this error.

Any ideas?

Server Error in '/' Application.
--------------------------------------------------------------------------------

An established connection was aborted by the software in your host machine
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: An established connection was aborted by the software in your host machine

Source Error:


Line 859:
Line 860:
Line 861:    conn.Open();
Line 862:    using (MySqlDataReader reader = cmd.ExecuteReader(CommandBehavior.SingleRow))
Line 863:    {
 

Source File: d:\appfolder\App_Code\CSCode\MySQLMembershipProvider.cs    Line: 861

Stack Trace:


[SocketException (0x2745): An established connection was aborted by the software in your host machine]
   System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +1019099
   MySql.Data.Common.SocketStream.Write(Byte[] buffer, Int32 offset, Int32 count) +22
   System.IO.BufferedStream.FlushWrite() +21
   System.IO.BufferedStream.Flush() +26
   MySql.Data.MySqlClient.MySqlStream.Flush() +119
   MySql.Data.MySqlClient.NativeDriver.ExecuteCommand(DBCmd cmd, Byte[] bytes, Int32 length) +114
   MySql.Data.MySqlClient.NativeDriver.SetDatabase(String dbName) +29
   MySql.Data.MySqlClient.MySqlConnection.ChangeDatabase(String database) +68
   MySql.Data.MySqlClient.MySqlConnection.Open() +323
   Andri.Web.MySqlMembershipProvider.ValidateUser(String username, String password) in d:\appfolder\App_Code\CSCode\MySQLMembershipProvider.cs:861
   System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160
   System.Web.UI.WebControls.Login.AttemptLogin() +105
   System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) +115
   System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) +171
   System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.213

0
vialetti
6/21/2007 6:29:14 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

3 Replies
1874 Views

Similar Articles

[PageSpeed] 29

Do you have a firewall on your machine?  This may be preventing your app from accessing MySQL via TCP/IP.

 

One other problem where I received this error was when I built a client/server app, and one machine had IPv6 protocol installed but the other machine had IPv4 (same domain/network).  When I changed both to IPv4, it worked.


---------------------------------------
MCP - Web Based Client Development .NET 2.0
0
ps2goat
6/21/2007 9:18:42 PM

Hello, I have other apps with the same configuration running in the same machine so I think the firewall is not an option.

This is not a standalone app, it is a web app.

0
vialetti
6/21/2007 10:03:54 PM

Hi vialetti,

I am afraid to say that it seems a bug said from MySql community. Here is link: http://bugs.mysql.com/bug.php?id=6634

Hope this helps. Thanks.


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
Jerome
0
Jerome
6/25/2007 1:55:29 PM
Reply:

Similar Artilces:

Exception while calling .NET web service | System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Hi,   We have written a .NET web service which retrieves an xml file from the database. This web service is SSL secured and requires client certificates for connection.   Problem: The web service is throwing an exception while retrieving large files. It works fine when the file size is around 1 MB, but fails with a file size of around 65 MB with the following exception: System.InvalidOperationException: There is an error in XML document (1, 38455668). ---> System.IO.IOException: Unable to read data from the transport connection. ---> System.Net.Sockets.SocketException: ...

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: Only one usage of each socket address (protocol/network address/port) is normally permitted
I'm getting this error when hitting a webservice thousands of times for a mass upload. I've researched on the web and added the suggested code but am still getting the error: protected override WebRequest GetWebRequest(Uri uri) { System.Net.HttpWebRequest webRequest = (System.Net.HttpWebRequest)base.GetWebRequest(uri); webRequest.KeepAlive = false; return webRequest; }  Are you receiving it on the client, or on the service?John Saunders | MVP – Connected System Developer...

Socket error 10053(An established connection was aborted by the software in your host machine.)
I make a socket server using js and send message from a client running on windows xp. But I get a 10053 error, I don't what's wrong with my client code. I use the same client code talking to a server writing with winsock is OK. I use the demo code from http://lxr.mozilla.org/mozilla/source/netwerk/test/TestServ.js and make a little change below consumeInput: function(input) { /* use nsIScriptableInputStream to consume all of the data on the stream */ var str = ""; var sin = Components.classes["@mozilla.org/scriptableinputstream;1&q...

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it
The following class throws an excpetion that is handled by Utilities.LogError(Ex) which in turn gives me the error with regards to send mail. However I am trying to figure out why is ExecuteSelectCommand() throwing an exception to begin with. Any help is very appreciated. I have attached the stack trace to get a better insight. Also I am a noob when it comes to oop, asp.net etc. Apologise is this is too silly a question. Thanks  :)public static DataTable ExecuteSelectCommand(DbCommand command) { //The DataTable to be returnedDataTable table; //Execute the command making sure the...

System.Net.Sockets.SocketException with MySQL Connector.NET
Hi. I already tried many things and spent already 2 days without any success. Please help or I'll hang myself.I am using MySql.Data.dll  ver. 5.2.5.0 (runtime v2.0.50727) from my project (library). It works great if i use it from WindowsApplication but once i use it same way in WebApplication, it keeps throwing: The attempted operation is not supported for the type of object referencedException Details: System.Net.Sockets.SocketException: The attempted operation is not supported for the type of object referenced .. AsyncResult ias = socket.BeginConnect(endPoint, null, null);.. (or w...

An established connection was aborted by the software in your host machine
Hello: Today I started my web application and it threw the following error: "An established connection was aborted by the software in your host machine" It highlighted the following line: "Dim myHttpResponse As Byte() = myHttpWebRequest.UploadData(ConfigurationSettings.AppSettings("url"), "POST", sendData)" Any suggestions on how I could fix this? At first I thought there might be a problem with the remote host it is trying to connect to, but the remote host works just fine... thanks. Need ASP.NET web hosting? Private Message ...

An established connection was aborted by the software in your host machine
hi, i write codings for sending email in asp.net ,there is no problem in the coding ,i dont know how to configure my smtp in IIS please help me to configure my smtp if i try to send email the below error was come.  Error: Server Error in '/WC_Finanzas' Application. An established connection was aborted by the software in your host machine 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.N...

An established connection was aborted by the software in your host machine
Hi All, I am trying to connect to the pop3 server to read mails from it. The server connects successfully but while logging user to the server from the code  I am getting the error 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: An established connection was aborted by the software in your host machineThe server is using SSL. I am using asp.net 2.0 vb to connect to the server. ...

System.Net.Sockets.SocketException
Hi, I am getting the following error. Does anyone know about this? It is working fine on some PC and giving error on others? Server Error in '/MyWebApps' Application. The requested name is valid and was found in the database, but it does not have the correct associated data being resolved for 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: The requested name is valid an...

System.Net.Sockets.SocketException
I've been getting this very wierd exception on the secure checkout page of a shopping cart app recently. There is no code in the page that directly uses the system.net namespace, and the page has been pretty much error-free for a year. I guess it could be an indication that something might be wrong with IIS. Here's the stack trace: at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s...

System.Net.Sockets.SocketException
Hi,   I am getting System.Net.Sockets.SocketException  exception on my server which is a console based application and i am using socket programming in it.i am getting this error only after 12.30am and  the server gets freezed, i am not able to trace the cause of the error as it occurs only at particular time and in particular condition, canm anyone please help me in finding the cause of this error and solution of it.Please Reply soon.   Thanks in advance Divya     These forums are for ASP.NET (web sites / web applications), not windows applica...

System.Net.Sockets.SocketException #2
 I'd like to try to consume RSS feed and I get error: http://www.macedonium.org/Default2.aspx?jazik=2I'm using this code: http://blogs.msdn.com/coding4fun/archive/2006/10/31/912335.aspxIn my web.config I have: <system.net>    <defaultProxy>      <proxy bypassonlocal="true" usesystemdefault="false" />    </defaultProxy>  </system.net>and I still get the error... Hero of the day...

XMLDocument and System.Net.Sockets.SocketException
Hi All, I am trying to load XML file and I got the following error. It is working fine on test server but not on LIVE Web Server. Exception Details: System.Net.Sockets.SocketException: 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 respondSource Error: Line 53: Line 54: XmlDocument xmlDoc = new XmlDocument(); Line 55: xmlDoc.Load(xmlData); Line 56: Line 57: XmlNodeList xmlNodeListRoot = xmlDoc.GetElementsByTagName("RootMenu&quo...

System.Net.Sockets.SocketException+webservice+Sourabh Das
Hi,I have placed a webservice in the webserver. When I access it from a webpage, default.aspx on a click of a button i get the following error:No connection could be made because the target machine actively refused it 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 itSource Error: Line 91:    ...

Web resources about - System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine - asp.net.getting-started

Resources last updated: 1/11/2016 5:08:10 AM