1

I have to consume a WCF Service. I have multiple layers in my project. I have one output project and other are library projects. All are dll projects except one output project. I would like to know the best place to place my service references. This is one serious architecture related concern that I want to understand.

The best thing that I found is that App.config or Web.config are placed in output projects. I should add service references in output project only because it is it generates bindings and other endpoint details in config file only. I will be required to copy paste all the things in output project only if place it in dll projects.

ScottG
  • 10,711
  • 25
  • 82
  • 111
Varun Setia
  • 165
  • 1
  • 11

1 Answers1

1

You need to copy the WCF configurations into the main web.config or app.config project. Whatever the executing program is. Referenced here: Cannot call WCF WebService from DLL

Or don't use configurations at all, do it programmatically like here: WCF Configuration without a config file

ScottG
  • 10,711
  • 25
  • 82
  • 111