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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Communication exception

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


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

View Complete Post

More Related Resource Links

WCF Wierd Communication Exception



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

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)


Handling Communication Exception in WCF



I am invoking a WCF service inside another WCF service. The primary WCF service is executing fine and the secondary WCF service is having some issues and throwing the exception which is not handled at primary service and a generic communication exception is logged.

In detail, I have two services ServiceA, ServiceB. Both services are constructed by us. ServiceA is directly consumed by client and invokes its operation contract where as ServiceB is consumed in ServiceA enclosed in Try Catch. The prod box in which ServiceB deployed is having some issue and the response is sent to the client of ServiceA directly. I am not sure why the catch code is not executed.

ServiceA code
    invoke ServiceB
   Handle Error

But the error is not handled. The message shared to consumer of ServiceA is
"The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error."

And the error message logged in prod box is
System.ServiceModel.ServiceActivationException: The service 'ServiceB' cannot be activated due to an exception during compilation.  The exception message is: "Memory gates checking failed because the free memory (227000320 bytes) is less than

WCF Tutorial - Basic Interprocess Communication

What the heck is WCF? For a long time, I couldn't tell you exactly what it was. And honestly, I still don't think I can. WCF is such a broad concept that it's hard to boil down into a concise explanation. When I finally started reading about it, and getting beyond the concepts, things started to clear up. That's what today's tutorial is about - cutting through all the concepts and just use WCF to build a basic server and a basic client.

Getting Started with Windows Communication Foundation

Windows Communication Foundation (WCF) provides a unified framework for rapidly building service-oriented applications that makes it easy to build and consume secure, reliable, and transacted Web services. It unifies the capabilities in ASMX, WSE, Remoting, COM+, and MSMQ; therefore developers need to learn only one programming model.


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.

Global Exception Handling with ASP.NET

After your global exception handler has done its work, you'll want to redirect the users of your website to a friendly page that tells them that something has gone wrong, and then provide them with customer support information as well as a link back to your web application's home page.

SQL Server 2005 Try and Catch Exception Handling

I'm pretty excited to see that there is some real error handling for T-SQL code in SQL Server 2005. It's pretty painful to have your wonderfully architected .NET solution tainted by less-than-VBScript error handling for stored procedures in the database. The big difference being the addition of TRY..CATCH blocks. Let's take a look:

Serial Communication with the .NET Compact Framework

Learn how to make your applications communicate over a serial port and how to handle common issues when implementing serial solutions. After a general discussion about serial communication and a common serial communication standard, this article demonstrates a practical use of the technologies through sample source code written in C#.

Serial Port Communication Read and Write using C#.net

In this simple article you will learn that how you can Open and read COM port data using System.IO.Ports Namespace.
Simply just create New Project of windows application in C#.

Import ServiceProcess APIs
using System.IO.Ports

Imports System.IO.Ports

Write Parsing functions which parse port data according to attached device

Event ID 1011 - DefaultAppPool World Wid Web Pub. Serv. fatal communication error

We have a Windows 2003 server running IIS6 1.1 Framework. We have also installed a DNS and Active Directory in the same machine.

We're randomly getting the error you can see below. Sometimes it causes the recycling of process w3wp.exe (which on my understanding represents the application pool worker processd) and other times results on this process hanging and not responding to any request. To do iisrest temporarly solves the problem.

We were pointed to a possible permissions problem between the user we were runnig the DefaultAppPool with and registry entries used by the iis. We noticed the default predifined user we used, Network Service, wasn't found in the Active Directory, so we changed it by the default configurable user, IWAM_MACHINE_NAME, which is under the IIS_WPG Active Directory Grupo, which, in theory has the correct permissions to run the application pool.

Well, none of this worked and we are still getting this error.

This is driving us crazy and think the problem might have to do with having the Domain Controller/Active Directory and the IIS6 running on the same machine. We'll try now uninstalling this DC pointing to another one to see what happens.

Any help would be appreciated.

Thanks in advance,


Event Type: Warning

reader.getordinal("column_may_not_exist") how to catch the exception?



would any body please help me to catch the exception if the column doesnot exist as my table columns are not static.

sometimes its throwing me indexoutofrange exception as the column doesnot exist

thanks for the help guys

Error while using exception handling block el 4.1


Hi Folks,


i am trying to use tyhe exception handling block of Enterprise library 4.1.


I just createda polisy and used IndexOutOfRangeException and added a replace handler and a logging handler to it.

I am using the NotifyRethrow PostHandlingAction to the exception.


During runtime I am getting an exception on the HandleException event, The exception is added below:



Object reference not set to an instance of an object.

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.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

Line 42:             catch (Exception ex)
Line 43:             {
Line 44:                 bool reThrow = ExceptionPolicy.HandleException(ex, "ReplacePolicy");
Line 45:         

userprincipal.changepassword throws exception


Hi all,

      userprincipal.changepassword(oldpassword, newpassword);

gives error: that is Configuration information could not be read from the domain controller, either because the machine is unavailable, or access has been denied. (Exception from HRESULT: 0x80070547)

but userDirectoryEntry.invoke("ChangePassword", new object[] { oldpassword, newpassword });

      userDirectoryEntry.CommitChanges works fine.

Any one please tell me the reason behind this.

active directory exception unusual behaviour


i have a small problem
i want user names from active directory for an auto completer type of service
the method is always throwing an exception 
"searcher.FindAll()' threw an exception of type 'System.DirectoryServices.DirectoryServicesCOMException' System.DirectoryServices.SearchResultCollection 

"Exception from HRESULT: 0x800AC472"


Am Exporting Data in to Excel File,meanwhile if i open any other Excel file than the excel File on which am exporting data gets opened up Automatically having name Book1.How should i stop these excel file not to get open.In the Error log i get an error message showing " Exception from HRESULT: 0x800AC472" . Need help on these.Thanks in Advance.

GPRS Communication using GSM Mobile


Dear all, 

I am working on a project which involves send messages through GPRS modem to a specified server port(having static IP).

I need .net code to send data through GPRS modem to server's specified port. If anyone having experience in this area please guide me.



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