You can instantiate endpoints, service models/security, etc.. purely in code at runtime... no need for external config files. I would host a sample service that looks like what you want, consume it in Visual Studio with the Add Service wizard, then inspect the WCF proxy classes that are generated for you. From that you should be able to reverse engineer how to do it all in code. I'm not sure if this would satisfy your no shared dll requirement though... because whatever model you come up with would probably be best in a class library (shared).