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


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

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

Posted By:      Posted Date: October 14, 2010    Points: 0   Category :WCF
 

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>


View Complete Post


More Related Resource Links

The socket connection was aborted Exception

  

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 =

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?

How to setup windows server 2008 to enable socket communication?

  
I wrote a simple socket program, which listens to the 82 port, then receives and sends data through it. I tested the program on my local machine and it works fine, but after I published the program onto my windows server 2008, it does not work anymore. I guess it should be the firewall causing the problem, so I added rules to allow 82 port for both in and out bound, and I also add my application to the allowed program list for passing firewall, but still doesn't work, how could I solve it?   The windows server 2008 machine has a public network IP address, while my workstation is in a local network without public IP address, I connect to server 2008 through a router which has a public IP address. Is that the problem?   thanks! Regards! directfriends.net

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.


Invalid Handle exception when browsing a site on the web front end

  

We are building a 3-tiered SharePoint 2010 farm that consists of 1 web front end (WFE), 1 app/CA server, and 1 database server.  All servers are running Windows 2008 service pack 1.  We can browse the Central admin site without any issue, but when we attempt to access sites on the WFE we get the following exception:

 

Server Error in '/' Application.


The handle is invalid. (Exception from HRESULT: 0x80070006 (E_HANDLE))

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack t

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 


WCF Wierd Communication Exception

  

Hi

I have two WCF services one public facing which proxies to a 'private' service which actually does the real work. The services exposed have identical interfaces and (practically) identical configs.

One of the interfaces is a streaming service using MTOM because there is a method to upload rather large binary files (and some smaller files too) the method is "AddAsset" it takes a binary array and a name and file type.

The client application receives a Communication Exception when attempting to call the AddAsset method but not always: If the client is attempting to upload, say, 20 images it will open the connection to the host and send one image at a time. Most images succeed BUT if an exception is received we have written a "retry" loop which gives it three (set by local config) more attempts. Here are some facts we have discovered:

  1. If a particular image fails once it will always fail in the client application it was run from
  2. The failures only occur from client applications based in one site - all other sites we have tried work no matter the internet connection speed
  3. tracing at the proxy demonstrates the exception
  4. tracing at the backend service does not log the exception - in fact does not log enough I think?
  5. Successive "retries" for an image always fail - that image will

Communication exception

  

Hi,

In a service I am creating an error like throw new exception ("My Ex");

Now in the client when i invoke the service I get communication exception. I changed the Include Fault details = true in the config. now the message My Ex is displayed. If I call any other function next to this I get comm channel is in fault state.

Kindly explain.


Vijaykishan | http://v2attechhorizon.blogspot.com

Network Error (tcp_error) A communication error occurred: "Connection refused"

  

I trying to execute my C# application from Visual Studio 2005 on a server that I'm remoted into.  I'm getting this error:

Network Error (tcp_error)

 

A communication error occurred: "Connection refused"

 

The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.

 

 I can accsss the internet from the remote connection and I am not seeing this error anywhere else.  Does anyone know what might be causing this?  Thanks forany help.

TableLayoutControl exception "Error creating window handle"

  
I am using a TableLayoutPanel to create a report on a form. The layout is 1 column, with a 
variable number of rows added based on the number of lines in the report. As I step through
a list of reports, the layout is cleared and rebuilt. After a few iterations of this an
exception in CreateHandle is thrown. Several hundred lines are destroyed and created each
time I switch reports.

I can't find a lot of mention of the error I'm seeing. Here is one of the better ones:

http://www.windowsdevelop.com/windows-forms-general/outofmemoryexception-error-creating-window-handle-53353.shtml


tableLayoutPanel1.SuspendLayout(); tableLayoutPanel1.Controls.Clear(); tableLayoutPanel1.RowStyles.Clear(); tableLayoutPanel1.RowCount = 0; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 30F)); tableLayoutPanel1.Controls.Add(header, 0, 0); tableLayoutPanel1.RowCount++; foreach(Measurement meas in list2) { ReportLine line = new ReportLine(meas); line.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 23F)); // "Unable to create window handle" exception here: tableLayoutPanel1.Controls.Add(line, 0, tableLayoutPanel1.RowCount); tableLayoutPanel1.RowCount++; } tableLayoutPanel1.ResumeLayout();
<
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