Another issue I came across was needing a way to dynamically connect to a WCF host without using the app.config file (which in all examples I see, they put the connection string in the app.config).
In code you can specify the endpoint address like so, with the “localhost:8008″ being the tcp address you want:
InstanceContext instanceContext = new InstanceContext(this);
client = new Service1Client(instanceContext);
client.Endpoint.Address = new EndpointAddress(“net.tcp://localhost:8008/Service1″);