none
"There was no endpoint listening..." on some computers RRS feed

  • Question

  • Hi,

    With the very simple sample WCF program copy/pasted below, the connection works on 8 machines out of 10. There's no config file, every parameters are set by coding. The Client and Host processes run on the same machine. On 2 machines the WCF Client returns this  error message:

    "There was no endpoint listening at net.pipe: //localhost/TSQ73/PipeServiceWCFTest that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."

    Any idea what's going on?

    WCFHost source code:

    Host = new ServiceHost(typeof(WCFConnection), new Uri[] { new Uri("net.pipe://localhost/TSQ73") });
    
    NetNamedPipeBinding pipeBinding = new NetNamedPipeBinding();
    
    pipeBinding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
    
    pipeBinding.MaxReceivedMessageSize = Int32.MaxValue;
    
    Host.AddServiceEndpoint(typeof(IWCFConnection), pipeBinding, "PipeServiceWCFTest");
    
    Host.Open();
    

    WCF Client:

    NetNamedPipeBinding pipeBinding = new NetNamedPipeBinding();
    
    pipeBinding.ReaderQuotas.MaxStringContentLength = Int32.MaxValue;
    
    pipeBinding.MaxReceivedMessageSize = Int32.MaxValue;
    
    this.pipeFactory = new ChannelFactory<IWCFConnection>(pipeBinding, new EndpointAddress("net.pipe://localhost/TSQ73/PipeServiceWCFTest"));
    
    if (pipeFactory.State != CommunicationState.Created)
    {
        throw new Exception("Pipe communication state not created!");
    }
    
    IWCFConnection pipeProxy = this.pipeFactory.CreateChannel();
    
    if (pipeFactory.State != CommunicationState.Opened)
    {
        throw new Exception("Pipe communication state not opened!");
    }
    
    IContextChannel contextChannel = (IContextChannel)pipeProxy;
    
    // Set a new TimeOut of 10 hours.
    contextChannel.OperationTimeout = new TimeSpan(10, 0, 0);
    

    Wednesday, March 27, 2013 1:44 PM

Answers

All replies

  • Hi,

    >>On 2 machines the WCF Client returns this  error message:

    I tried your service and client on my side (Win7), it works as expected. Does the service stared correctly at the 2 machines? Please make sure you have run the service and client at administrator, one possible cause is the service process doesn't have privilege to open a global named pipe.

    You can refer to #Dealing with OS privilege 'issues' in WCF Named Pipes scenarios

    http://weblogs.thinktecture.com/cweyer/2007/12/dealing-with-os-privilege-issues-in-wcf-named-pipes-scenarios.html

    You can create a delegate to watch if you have started the service correctly.

    Host.Opened += delegate
                {
                    Console.WriteLine("service started!");
                };
                Host.Open();

    If it the issue still exists, try to use pipelist to monitor named pipes on that machine.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, March 28, 2013 6:52 AM
    Moderator
  • Hi,

    >>On 2 machines the WCF Client returns this  error message:

    I tried your service and client on my side (Win7), it works as expected. Does the service stared correctly at the 2 machines? Please make sure you have run the service and client at administrator, one possible cause is the service process doesn't have privilege to open a global named pipe.

    You can refer to #Dealing with OS privilege 'issues' in WCF Named Pipes scenarios

    http://weblogs.thinktecture.com/cweyer/2007/12/dealing-with-os-privilege-issues-in-wcf-named-pipes-scenarios.html

    You can create a delegate to watch if you have started the service correctly.

    Host.Opened += delegate
                {
                    Console.WriteLine("service started!");
                };
                Host.Open();

    If it the issue still exists, try to use pipelist to monitor named pipes on that machine.

    Best Regards.


    Haixia
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Hi Haixia Xie

    Can you check this Thread?? I suffered this days to solve my problem :( 

    Thursday, March 28, 2013 7:00 AM