none
There was no endpoint listening from only one client RRS feed

  • Question

  • Hi,

    I have a desktop application and a webservice in the same machine.  The desktop application is hosting a service listening to 'net.pipe://localhost/Karaoke'.  I tested with wcf web client, and it works fine.

    I have a webservice (hosted in IIS), listening to 'http://machinename/web/GameService.svc', that also work fine with wcf test client.

    The game service have one OperationContract where it calls the 'net.pipe://localhost/Karaoke'.  When I call this contact in developpement computer, the call is passed to the net.pipe service, and it works fine.  But in production computer, it returns 'There was no endpoint listening'.  I can consume both services with WCF test client, but when the webservice calls the net.pipe service, it gets this error on production only.

    Any clue will be appreciated.

    here is the app.config for desktop application:

    <system.serviceModel>
            <behaviors>
                <serviceBehaviors>
                    <behavior>
                        <serviceMetadata />
                        <serviceDebug includeExceptionDetailInFaults="false" />
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <services>
                <service name="KReality.KaraokeService">
                    <endpoint binding="netNamedPipeBinding" bindingConfiguration=""
                        name="NamedPipes" contract="KReality.IKaraokeService" />
                    <endpoint address="mex" binding="mexNamedPipeBinding" bindingConfiguration=""
                        name="NamedPipesMex" contract="IMetadataExchange" />
                    <host>
                        <baseAddresses>
                            <add baseAddress="net.pipe://localhost/Karaoke" />
                        </baseAddresses>
                    </host>
                </service>
            </services>
            <bindings>
                <basicHttpBinding>
                    <binding name="BasicHttpBinding_IRevSvc" />
                </basicHttpBinding>
                <netNamedPipeBinding>
                    <binding name="NamedPipes" />
                </netNamedPipeBinding>
            </bindings>
            <client>
                <endpoint address="net.pipe://localhost/streamanalyzer" binding="netNamedPipeBinding"
                    bindingConfiguration="NamedPipes" contract="StreamAnalyzer.IDecryptor"
                    name="NamedPipes">
                    <identity>
                        <servicePrincipalName value="host/localhost" />
                    </identity>
                </endpoint>
                <endpoint address="http://licensing.realityentertainmentvideo.com/RevSvc.svc"
                    binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IRevSvc"
                    contract="revsvc.IRevSvc" name="BasicHttpBinding_IRevSvc" />
                <endpoint address="net.pipe://localhost/DVD" binding="netNamedPipeBinding"
                    bindingConfiguration="NamedPipes" contract="DVD.IDVDService"
                    name="NamedPipes">
                    <identity>
                        <servicePrincipalName value="host/localhost" />
                    </identity>
                </endpoint>
                <endpoint address="net.pipe://localhost/DVD" binding="netNamedPipeBinding"
                    bindingConfiguration="NamedPipes" contract="DVDService.IDVDService"
                    name="NamedPipes">
                    <identity>
                        <servicePrincipalName value="host/localhost" />
                    </identity>
                </endpoint>
                <endpoint address="net.pipe://localhost/FileService" binding="netNamedPipeBinding"
                    bindingConfiguration="NamedPipes" contract="FileIndexing.IFileIndexingService"
                    name="NamedPipes">
                    <identity>
                        <servicePrincipalName value="host/localhost" />
                    </identity>
                </endpoint>
            </client>
        </system.serviceModel>

    and webapplication (web.config)
    <system.serviceModel>
            <bindings>
                <netNamedPipeBinding>
                    <binding name="NamedPipes" />
                </netNamedPipeBinding>
            </bindings>
            <client>
                <endpoint address="net.pipe://localhost/Karaoke" binding="netNamedPipeBinding"
                  bindingConfiguration="NamedPipes" contract="KaraokeService.IKaraokeService"
                  name="NamedPipes">
                    <identity>
                        <servicePrincipalName value="host/localhost" />
                    </identity>
                </endpoint>
            </client>
            <behaviors>
                <serviceBehaviors>
                    <behavior name="">
                        <serviceMetadata httpGetEnabled="true" />
                        <serviceDebug includeExceptionDetailInFaults="false" />
                    </behavior>
                </serviceBehaviors>
            </behaviors>
            <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
              multipleSiteBindingsEnabled="true" />
        </system.serviceModel>

    
    


    Wednesday, October 8, 2014 2:14 PM

Answers

All replies

  • Does it work on a debug build and not on a release build?  If so it sound like the release build did not get rebuilt with all the changes.

    jdweng

    Wednesday, October 8, 2014 3:51 PM
  • no, it's the same build.  I just test it on my development computer, and if it works, I copy those files to the production computer, just to be sure having the exact same files.

    Thanks,

    Eric Jalbert

    Wednesday, October 8, 2014 4:35 PM
  • You can't build on one computer and install on another unless one of two things happen

    1)  You are using the exact same version of Net on both computers including any updates.  If you do make sure the .exe file (or dll) matches the date when you last built.  When you build either the executable in the debug folder or the executable in the release folder gets updated.  No both executables.

    2)  You publish the application and then run the setup.exe that is created with the publish on the 2nd computer.


    jdweng

    Wednesday, October 8, 2014 5:51 PM
  • I agree, I confirm that the files are running fine, because all other operation contract are working like supposed.  It is the exact same .net version too.

    There is no setup.  Also this is not version 1.0 of my application.  I am developping it since 3 years and did many updates.  I did not added any dll reference since last update.  That is why I can tell you for sure that this is the exact same version. 

    I tried to look at the net pipe activation may be not installed, but that's not the case.  I also can use the net pipe service from the Microsoft wcf test client, and it works fine.  it's only when the web application tries to consume it that the problem occurs.

    I also looked at the permission problem.  I tried running the application pool Under administrator account rather than network service, it did not changed anything. 

    Thank you for your precious help,

    Eric Jalbert

     

    Wednesday, October 8, 2014 6:14 PM
  • I assume you ran the exe on the build computer and it worked.  My best guess right now is you are using the wrong end point to listen on the local computer.  The end points are an array and you need to check the IP address to make sure you are connecting to the correct end point.

    The end point is in the following file

    C:\WINDOWS\system32\drivers\etc\hosts

    The order of the hosts may be different on the two computers.  You don't need to change the hosts but you may have to loop through the array to get the correct end point.  I usually have the server listen to the IPAddressAny.

    Another test to try is to use from cmd.exe window

    Ping LocalHost  

    On some computers it will return the IP adress of the computer while on others it will return the loopback IP 127.0.0.1.  This depends on order the IP address are put in the host file.

    Another possiblility is one computer is set to IPV6 (not IPV4).  You may need to specifically add the property to your VS code to use VP4 to override the default computer settings.

    Finally the port number you are using may already be used by another application.  From a cmd.exe try the following command

    NetStat -a


    jdweng

    Wednesday, October 8, 2014 9:10 PM
  • I found the exact answer here:

    http://stackoverflow.com/questions/1848790/named-pipe-not-found-when-using-wcf-netnamedpipebinding

    All my configuration are correct, but cannot work because the server (desktop application) and the client(IIS) are not running in the same context.  With named pipes, it is using shared memory, so both have to run in the same context.  I change named pipes for net.tcp, and everything works fine now.

    Thanks.

    • Marked as answer by Eric Jalbert Tuesday, October 14, 2014 4:19 PM
    Tuesday, October 14, 2014 4:18 PM