views:

11

answers:

2

when adding a service reference an app.config is generated. What I'd like to know is, do the bindings, endpoints and everything else reflect the service, that I created the reference to? Do they specifically define that services bindings, security type,..etc, or is it simply a generic app.config? There seem to be a lot of settings..

+2  A: 

Yes, the amount of stuff the Add Service Reference wizard dumps in your app.config/web.config is staggering - and largely unnecessary (because it basically puts in all the settings, even all of those that are default values).

Yes, the settings include thing like

  • binding and binding configuration (parameters like timeouts, proxies etc.)
  • behaviors (client-side)
  • client endpoint(s)

If you're interested in learning how to manually create those configs to the bare minimum (which is very easy to do, very easy to understand, too!), watch these videos:

Both show how easy it is to create manual configs and how little you really need to supply! Highly recommended.

marc_s
Thank you! That's exactly what I was looking for :)
Avien
A: 

The settings do pertain to the service reference you just created. At least sometimes, the app.config is not useful in itself. For instance, if you are consuming services from a web application, the information in app.config needs to be copied to the appropriate section of web.config to be used.

If the service moves to a different location, you can just change the endpoint in the configuration accordingly, and the service should work as before.

Andrew