WCF Service Reference Support Files Not Updating
I have a VS 2010 solution containing a WCF service project and a unit test project. The unit test project has a service reference to the WCF service.
Web.config for the WCF service project sets a number of binding attributes to other-than-default values:
web.config: (Specifically note maxBufferSize=”20000000“)
While examining this issue, I came to realize that the unit test project’s service reference support files do not contain the values I would expect (i.e. the values configured in the WCF service’s web.config):
Deleting and re-creating the service reference or updating the service reference re-creates the files, but I still end up with the same values.
Here’s the app.config of the client
Same issue here and no solution after half a day messing about with config files… Changing automatically generated files is usually frowned upon, so my feeling says that “there has got to be a better way, Dennis”.
UPDATE: I got my problem fixed by removing the name attribute in the binding configuration.
I think you only need to this at the client-side. By removing the name attribute, you essentially change the default basicHttpBinding configuration for your app, as far as I understand it. Credits for this solution here.
Another update: if you name your service configuration correctly (including the namespace) it will pick up the binding configuration. So instead of