.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
Sharon Maxwell
Post New Web Links

The socket connection was aborted Exception

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :WCF
 

Hi All,

whenI use wcf, the client recorded the exception below.

if server and client deploy same computer the exception can't occur.

if server and client deploy different computer the exception can occur.

The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '01:40:29.2170000'.

I am perttymuch sure tat its not because of time out. I have given the config like this in client side and service side

 

NetTcpBinding tcpBinding = new NetTcpBinding();

tcpBinding.SendTimeout =


View Complete Post


More Related Resource Links

How to handle the socket connection was aborted communication exception.....

  

Hi All,

I keep getting the following exception and I would want to know how I can handle this. I am using NET TCP BINDING.

<Message>The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '10675199.02:48:05.4775807'.

Exception Detail:

System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '10675199.02:48:05.4775807'. ---&gt; System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host

--- End of inner exception stack trace ---

at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)

at System.ServiceModel.Channels.FramingDuplexSessionChannel.EndTryReceive(IAsyncResult result, Message&amp; message)

at System.ServiceModel.Dispatcher.DuplexChannelBinder.EndTryReceive(IAsyncResult result, RequestContext&amp; requestContext)

at System.ServiceModel.Dispatcher.ErrorHandlingReceiver.EndTryReceive(IAsyncResult result, RequestContext&amp; requestContext)

</Message>

CommunicationException: The socket connection was aborted

  

I have a .NET 4.0 WCF service (Net.TCP) hosted in IIS 7.5.  Every once in a while I see Socket related errors on the server.  Is this a timeout issue?  How can I prevent this from happening?   

 

//This is the outer exception

TypeName: System.ServiceModel.CommunicationException

TypeAssembly: System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Message: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:10'.

Source: System.ServiceModel

TargetSite: Int32 ReadCore(Byte[], Int32, Int32, System.TimeSpan, Boolean)

StackTrace:    at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)

   at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)

   at System.ServiceModel.Channels.PreReadConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)

   at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)

&nb

Exception: "The underlying connection was closed: The connection was closed unexpectedly." (sometime

  
I have a windows app connecting to a webservice.  In some situation(s) (haven't narrowed it down enough), I get the following exception: The underlying connection was closed: The connection was closed unexpectedly. When this exception is thrown, it is calling a method of a web reference. Now the situation that we experience this is on a laptop in the field that is using a WWAN connection in at least one location.  It works fine in the lab at the office.  Anyone have any ideas what could be causing this?

An established connection was aborted by the software in your host machine

  
Hello, i am facing problem with socket connection aborted for one of the service. Following is the detailed error,   ORIGINAL EXCEPTION:   An exception of type 'System.ServiceModel.CommunicationObjectAbortedException' occurred and was caught. ------------------------------------------------------------------------------------------------------- 06/25/2010 10:06:20 Type : System.ServiceModel.CommunicationObjectAbortedException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : The socket connection was aborted by your local machine. This could be caused by a channel Abort(), or a transmission error from another thread using this socket. Stack Trace :  Server stack trace:     at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)    at System.ServiceModel.Channels.SocketConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)    at System.ServiceModel.Channels.DelegatingConnection.Read(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)    at System.ServiceModel.Channels.SessionConnectionReader.Receive(TimeSpan timeout)    at System.ServiceModel.Channels.SynchronizedMessageSource.Receive(TimeSpan timeout)    at System.ServiceModel.Channels.FramingDup

Rare exception: Unable to read data from the transport connection: An existing connection was forcib

  
Our .NET 2.0 app relies upon the ability to download xml webpages from URLs.  At startup, we have about 6 boxes in the wild (out of thousands) that are seeing the following inner exception when they try to download an xml page.  System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. (Inner: ) System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. They can get to the URL in their browser just fine, so we know our server is working.  Furthermore, the embedded WebBrowser control in our app can pull up webpages just fine, so I don't think their firewall is blocking our app.  I'm hoping it's just some diagnosible configuration issue.  Here is the snippet of code that does the downloading: WebRequest request = WebRequest.Create(fileToDownload.SourceUri);request.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);request.Timeout = (int)DefaultTimeout.TotalMilliseconds;request.Method = "HEAD";WebResponse response = request.GetResponse(); Nothing revolutionary there. (I've also tried it without the HEAD request, without keepalive, and using HTTP 1.0).  And here is the exception: System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. StackTrace Infor

problem in socket connection

  
I had client and Server application, the server application to listern an a particular port. 500 clients are to connected and send the data to process everything fine.  At particular time i closed all clients and also close the server. when i start server after 10 mins at before 2 mins start all clients, very few clients(5-15) are connected. give me a solutiion.

Blob Cache Event ID 7888 Runtime Exception Thread was being aborted

  
HI, We have 3WFE and we are getting error Events 788 and 5538 on all three servers at same time. Any thoughts on what is causing this error? Event Type: Error Event Source: Office SharePoint Server Event Category: Office Server General Event ID: 7888 Date:  9/14/2010 Time:  2:31:08 PM User:  N/A Computer: MOSS2007A Description: A runtime exception was detected. Details follow. Message: Thread was being aborted. Techinal Details: System.Threading.ThreadAbortException: Thread was being aborted.    at System.Threading.ReaderWriterLock.AcquireWriterLockInternal(Int32 millisecondsTimeout)    at Microsoft.SharePoint.Publishing.BlobCache.<>c__DisplayClass14.<>c__DisplayClass17.<FetchItemFromWss>b__11()    at Microsoft.Office.Server.Diagnostics.FirstChanceHandler.ExceptionFilter(Boolean fRethrowException, TryBlock tryBlock, FilterBlock filter, CatchBlock catchBlock, FinallyBlock finallyBlock) For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.   Event Type: Error Event Source: Office SharePoint Server Event Category: Publishing Cache Event ID: 5538 Date:  9/14/2010 Time:  2:31:08 PM User:  N/A Computer: MOSS2007A Description: An error occured in the blob cache.  The ex

Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

  

We are current users of WSS 3.0 SP1 (MS SQL Server 2005 w/SQL Server Configuration Manager & SQL Server Management Studio Express) and are having issues with the following error occurring quite frequently when we visit pages on our SharePoint site.

 

Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

 

Our research keeps brining up that the log files are getting large and are not being cleared. We are doing a Full Backup of our SharePoint Farm with BackupExec 11d so we are not understanding how to fix this. Does anyone have any suggestions...

 

Thanks in advance.


Operation aborted exception

  

Hi All,

In my Application I am getting opration abord exception in IE6 and IE7

All my scripts are in .js files only and I am unable to handle OperationAbortedException in my asp.net page code.

Please let me know If anybody have the solution.

Thanks in advance.


Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))

  

hi,

While adding users in to sharepoint group, i am getting the error msg as "Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) " .what is this means, how ro resolve this? Please guide me.


Making a socket connection through a proxy.

  

Hi,

I've got an application in test where I create an internet socket that connects to a service over the inernet and receives a stream that I translte to XML files. So far so good. Now I'm told I need to be able to do this through a proxy server and am stumped. What am I missing, how do I do this? Thanks!

Mike 


Socket Connection Error

  

Hi All,

Am using socket connection to send and receive values. The following code is used to receive response.

  while ((sizeReceived = skt.Receive(bytesReceived, bytesReceived.Length, SocketFlags.None)) > 0)
                   {
                       nTotalBytes += sizeReceived;
                       sCleanresponse += Encoding.ASCII.GetString(bytesReceived, 0, sizeReceived);
                       //Giving time to read the remaining amount
                       System.Threading.Thread.Sleep(100);
                       if (skt.Available > 0)
                           continue;
                       else
                           break;
                   }


In the above code, am facing a prob in skt.Available. If i dont give the thread.sleep, it is not repeating the while loop and it exits after onetime. And if i dont give skt.Available line, sometimes it throws socket Exception. I do not want to use thread.sleep. Does anyone knows why this is happening and how can i resolve this? 


Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT

  

whe i open the sharepoint site gave Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT

and the  event log in SHarePoint server

 

Event Type:        Error

Event Source:     Windows SharePoint Services 3

Event Category: Database

Event ID:              5586

Date:                    10/25/2010

Time:                    3:04:52 PM

User:                    N/A

Computer:        

App to Support WebService and Socket Connection

  

Hi,

I have a scenario at my hand where in I have to build a WebApp/Control for implemeting the following two scenarios:

1. The Server app will be accesed by a device and based on the logic,  an XML is returned to the calling device. My solution is to implement a WebService for this.

2. The App also needs to communicate with another device for transfering the images, videos, audio, etc to the server app. The requirement from the client (who himself has a bit of Technically knowledge) end is to do it using the Sockets.

 

I am not sure if the same can be bundled into the same app. But have to do it somehow.

Any sort of inputs will be highly appreciated.

 

Cheers!!

Sumit Bhatnagar


Cheers!! Sumit Bhatnagar

Socket Connection Is Actively Refused

  
I have a server application written is C/C++ that finds an available port, creates a socket, and starts listening.  The server posts its IP Address and port to a database so that clients can connect to the server.  I have a Client application written in C/C++ that has no problem connecting to this server; however, I am rewriting that client application in C# and I cannot get the client to connect to the server.  I consistently receive a "No connection could be made because the target machine actively refused it 10.0.0.6:26069" exception.  I have stepped through the code and the IP Address and port look correct to me.  I don't think this is a firewall problem since my other client is able to connect and I have tried my new client with the firewall disabled.  The server is using verson 2.0 sockets.  Below is the code I am using in my C# client to try to connect to my server.
// Create an IP Address from the data read from the DB

NetworkStream.BeginRead hangings without exception when connection is down

  

Im calling the async NetworStream.BeginRead.  If the portserver im taking to is off this call just hangs - I dont get an exception nor is my callback called reporting 0 bytes read.  If in this state I try to send on the stream then my callback is called and EndRead throws an exception - thats fine - but I cant get that behaviour unless I try a write.  The streams underlying socket doesnt show the connection as down.

How to detect that the connection is down?  Do I have to poll the streams socket?  Is there any other way?


EXCEPTION HANDLING IN C#

  
Every self-respected programmer should include exception handling techniques. Sometimes your application will generate an error. Regardless of who was responsible for this error, the programmer or the user, it is up to the first to include the necessary exception handling techniques to keep his/her program from crashing. The .Net environment provides useful techniques for avoiding disastrous errors such as try-catch statements and user-defined exceptions.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend