-1

I'm having continuous exception on live server and performance issues.

After enabling trace service log in wcf config file I found 100 of same exceptions.

enter image description here

Basic Information

 Activity ID    {00000000-0000-0000-0000-000000000000}
Time    2019-08-26 19:59:44.7454
Level   Error
Source  System.ServiceModel
Process w3wp
Thread  55
Computer    PC3
Trace Identifier/Code   https://learn.microsoft.com/dotnet/framework/wcf/diagnostics/tracing/System-ServiceModel-Diagnostics-ThrowingException

Exception

System.IO.PipeException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Exception Type

System.IO.PipeException, System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Message

There was an error reading from the pipe: The pipe has been ended. (109, 0x6d).

Here is the code I'm using common code

public static WMC.Proxy.BLLService.BLLServiceClient GetBLLServiceClient()
        {
            var client = new WMC.Proxy.BLLService.BLLServiceClient(settings.GetBinding(settings.BLLServiceBinding), new EndpointAddress(settings.BLLServiceAddress));
            SetMaxGraphInItems(client);
            return client;
        }

How can I fix this?

halfer
  • 19,824
  • 17
  • 99
  • 186
skhurams
  • 2,133
  • 7
  • 45
  • 82

2 Answers2

1

After a long search on the internet, I found the issue might be relates to the Enum type, which caused serialization failure.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/ee75d768-fd80-4c2b-831e-1d6dd6d4dd17/there-was-an-error-reading-from-the-pipe-the-pipe-has-been-ended-109-0x6d?forum=wcf
WCF NamedPipe CommunicationException - "The pipe has been ended. (109, 0x6d)."
There are many factors contributing to this problem, including data contract, service contract irregularities. It boils down to the fact the there is something wrong with the serialization. Please refer to the below discussion, wish it is useful to you.
http://gonetdotnet.blogspot.com/2014/07/solved-there-was-error-reading-from.html
https://blogs.infosupport.com/there-was-an-error-reading-from-the-pipe-unrecognized-error/
Feel free to let me know if the problem still exists.

Abraham Qian
  • 7,117
  • 1
  • 8
  • 22
0

Just to be sure, here's web.config section for the trace listener:

<system.diagnostics>  
<sources>  
  <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing"><listeners><add name="xml" /></listeners></source>  
  <source name="System.ServiceModel" switchValue="Information, ActivityTracing" propagateActivity="true"><listeners><add name="xml" /></listeners></source>  
  <source name="CardSpace"><listeners><add name="xml" /></listeners></source>
  <source name="System.IO.Log"><listeners><add name="xml" /></listeners></source>
  <source name="System.Runtime.Serialization"><listeners><add name="xml" /></listeners></source>
  <source name="System.IdentityModel"><listeners><add name="xml" /></listeners></source>
</sources>
<sharedListeners>  
  <add name="xml" type="System.Diagnostics.XmlWriterTraceListener" initializeData="D:\PutYourPathHere.svclog" />  
</sharedListeners>  
</system.diagnostics> 

Produced file can be inspected using Microsoft Service Trace Viewer.

Try to inspect other events as well. There may be some Contract related issues causing serialization to fail.

If you are absolutely sure that your contract and serialization are fine, then try to reboot "Net.Pipe Listener Adapter" service.

If that does not help, try recycling app pool.

We can see theese issues time to time after new releases or config updates. They are related to wrong communication termination of previous instances.

PavlinII
  • 1,061
  • 1
  • 7
  • 12