none
The pipe endpoint could not be found on your local machine RRS feed

  • Question

  • Dear friends,
    I developed a wcf service which has 2 endponts :
    1-  netpipe endpoint that runs in windows service context.
    2-  baseHttpBinding which runs in IIS

    I have no problem to connect to IIS endpoint. My problem is when i wanna connect netpipe endpoint which returns me the following error :
    "The pipe endpoint 'net.pipe://127.0.0.1/MyBank' could not be found on your local machine. "

    I changed 127.0.0.1 to localhost and MachineName(HellBoy here) but the results were same.
    could someone help me?
    here are code(summerized):

    My Service file (no app.config file):
    protected override void OnStart(string[] args)
    {
                ServiceHost hoster = new ServiceHost(typeof (MyBank) );
                NetNamedPipeBinding bnd = new NetNamedPipeBinding();
                hoster.AddServiceEndpoint( typeof(TestWCF.IBank), bnd, "net.pipe://127.0.0.1/MyBank");
    }



    My Client App.Config file (the service client is a windows form application):
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
        <system.serviceModel>
            <bindings />
            <client>
                <endpoint address="http://hellboy/TestWCF/MyService.svc" binding="basicHttpBinding"
                    contract="TestWCF.IBank" name="BasicHttpBinding_IBank" />
                <endpoint address="net.pipe://127.0.0.1/MyBank" binding="netNamedPipeBinding"
                    contract="TestWCF.IBank" name="NetPipeBinding_IBank" />
            </client>
        </system.serviceModel>
    </configuration>


    The client codes:
            private void button2_Click(object sender, EventArgs e)
            {

                sc = new WfcClient.TestWCF.BankClient("NetPipeBinding_IBank");
               
                TestWCF.UserAccount user;
                user = sc.AddUser("navid", 2000000);// the error occures at this point!!!
                textBox2.Text = "connected";

            }


    And finally the complete exception is :
    System.ServiceModel.EndpointNotFoundException was unhandled
      Message="There was no endpoint listening at net.pipe://127.0.0.1/MyBank that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details."
      Source="mscorlib"
      StackTrace:
        Server stack trace:
           at System.ServiceModel.Channels.PipeConnectionInitiator.GetPipeName(Uri uri)
           at System.ServiceModel.Channels.NamedPipeConnectionPoolRegistry.NamedPipeConnectionPool.GetPoolKey(EndpointAddress address, Uri via)
           at System.ServiceModel.Channels.ConnectionPoolHelper.EstablishConnection(TimeSpan timeout)
           at System.ServiceModel.Channels.ClientFramingDuplexSessionChannel.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout)
           at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade)
           at System.ServiceModel.Channels.ServiceChannel.EnsureOpened(TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
           at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
           at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
           at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
        Exception rethrown at [0]:
           at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
           at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
           at WfcClient.TestWCF.IBank.AddUser(String name, Single balance)
           at WfcClient.TestWCF.BankClient.AddUser(String name, Single balance) in C:\Documents and Settings\Mahmoud.HELLBOY\My Documents\Visual Studio 2008\Projects\TestWCF\WfcClient\Service References\TestWCF\Reference.cs:line 130
           at WfcClient.Form1.button2_Click(Object sender, EventArgs e) in C:\Documents and Settings\Mahmoud.HELLBOY\My Documents\Visual Studio 2008\Projects\TestWCF\WfcClient\Form1.cs:line 43
           at System.Windows.Forms.Control.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnClick(EventArgs e)
           at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
           at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
           at System.Windows.Forms.Control.WndProc(Message& m)
           at System.Windows.Forms.ButtonBase.WndProc(Message& m)
           at System.Windows.Forms.Button.WndProc(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
           at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
           at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
           at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
           at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
           at System.Windows.Forms.Application.Run(Form mainForm)
           at WfcClient.Program.Main() in C:\Documents and Settings\Mahmoud.HELLBOY\My Documents\Visual Studio 2008\Projects\TestWCF\WfcClient\Program.cs:line 18
           at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
           at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
           at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
           at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
           at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
           at System.Threading.ThreadHelper.ThreadStart()
      InnerException: System.IO.PipeException
           Message="The pipe endpoint 'net.pipe://127.0.0.1/MyBank' could not be found on your local machine. "
           ErrorCode=-2146232800
           InnerException:

    Wednesday, April 29, 2009 6:35 PM

Answers

  • It looks like that after you start to host your pipe service, it just exits right after execution exits from OnStart, also i cannot see hoster.Open() call. Or you remove some code?

    {
      ServiceHost hoster = new ServiceHost(typeof (MyBank) );
      NetNamedPipeBinding bnd = new NetNamedPipeBinding();
      hoster.AddServiceEndpoint( typeof(TestWCF.IBank), bnd, "net.pipe://127.0.0.1/MyBank");
    }

    Regards
    Wednesday, April 29, 2009 6:47 PM

All replies

  • It looks like that after you start to host your pipe service, it just exits right after execution exits from OnStart, also i cannot see hoster.Open() call. Or you remove some code?

    {
      ServiceHost hoster = new ServiceHost(typeof (MyBank) );
      NetNamedPipeBinding bnd = new NetNamedPipeBinding();
      hoster.AddServiceEndpoint( typeof(TestWCF.IBank), bnd, "net.pipe://127.0.0.1/MyBank");
    }

    Regards
    Wednesday, April 29, 2009 6:47 PM
  • owwwwwwww....thats true!!! Really thanks...Shame on me to do this silly mistake! :-)
    Wednesday, April 29, 2009 6:55 PM