2

So I have my named pipe declared like this:

        DuplexChannelFactory<IServiceHandler> pipeFactory;pipeFactory =
              new DuplexChannelFactory<IServiceHandler>(
                  myCallbacks,
                 new NetNamedPipeBinding(),
                 new EndpointAddress(
                    "net.pipe://localhost/Server"));
        pipeProxy = pipeFactory.CreateChannel();

(THIS WORKS)

I want to put the configuration in the app.config file so I go there and make it:

<client>
  <endpoint address="net.pipe://localhost/Server" binding="netNamedPipeBinding"
    bindingConfiguration="netNamedPipeBinding" contract="WCFClient.IServiceHandler"
    name="ClientEndpointinClient" />
.
.
.

And then remove the config from the declaration:

        pipeFactory =
              new DuplexChannelFactory<IServiceHandler>(
                  myCallbacks);
        pipeProxy = pipeFactory.CreateChannel();

Don't worry about callbacks, they are well declared. But when I try to do the Create channel, it says that the endpoint is null...

What am I missing?

2
  • 1
    Don't you ahve to use the endpoint name "CleintEndpointClient" somewhere? Commented Jul 30, 2013 at 19:24
  • It is in my server configuration Commented Aug 19, 2013 at 13:45

1 Answer 1

1

Pass the Endpoint name as a string, or an EndpointAddress instance, into the CreateChannel() method call.

Sign up to request clarification or add additional context in comments.

2 Comments

It's going to be pretty hard to avoid according to your code that uses channels...
Oh true I forgot the configuration name in the channel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.