Click here to Skip to main content
15,922,145 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I'm a newbie to WCF,

I'm working on a project with server and clients and it works very well with NetNamedPipBinding it and I want it to work on across machines.

I know that I need to channge the binding to TcpBinding but I dont know how should I do it exactly...

Here is code example...

(thats the EndPoints with address)

XML
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"
          listenUriMode="Explicit">
          <identity>
            <dns value="localhost" />
            <certificateReference storeName="My" storeLocation="LocalMachine"
              x509FindType="FindBySubjectDistinguishedName" />
          </identity>
        </endpoint>
        <endpoint address="net.pipe://localhost" binding="netNamedPipeBinding"
          bindingConfiguration="" contract="Library.IStringReverser" />
        <host>
          <baseAddresses>
            <add baseAddress="http://localhost:8731/Design_Time_Addresses/Library/StringReverser/" />
          </baseAddresses>



and this the code in client..

XML
ServerEvents myCallbacks = new ServerEvents();

            DuplexChannelFactory<IStringReverser> pipeFactory =
               new DuplexChannelFactory<IStringReverser>(
                  myCallbacks,
                  new NetNamedPipeBinding(),
                  new EndpointAddress(
                     "net.pipe://localhost/PipeReverse"))


Thank you all..
Posted
Updated 9-Sep-10 22:02pm
v2
Comments
Dalek Dave 10-Sep-10 4:02am    
Edited for Grammar, Spelling and Code Block.

1 solution

HI

In your endpoint tag the attribute Binding use Binding=netTCPBinding
 
Share this answer
 
Comments
Sandeep Mewara 10-Sep-10 8:26am    
Comment from OP: Thats all the story?
I need to do only that thing?


and by the way... in which address should I use and how to do it in order to comunicate between 2 computers...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900