Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update service reference not working

I'm using Visual Studio 2008 and have a WCF client working against a WCF service. They are both located in the same Visual Studio solution. After I've made a change in my WCF contract, I want to update the service reference on the client so that changes made to the contract is also made in the proxy.

My problem is that the proxy code is not re-generated.

When I select to update the service reference, the following happens:

  1. A dialog with the title "Updating service reference 'name-of-reference'" is shown. This dialog has a progress bar.
  2. The progressbar moves and the status text in the dialog is changed to "Updating configuration"
  3. The progressbar moves a bit more, and the status text is chnaged to "Configuration update complete"

The dialog doesn't show the text "Generating \something\" (can't remember the exact wording) which I would expedct.

If I delete the service reference and add it again, the proxy is properly generated. I add the service using the exact same settings as before, so I don't think it's a issue I can solve by changing the service reference configuration on the client.

One thing I suspect may be the problem is that I've renamed the default wsHttpBindings in app.config. I've also renamed the default endpoints. The reason behind this is that I need more than one endpoint and having one named 'some-default-name' and one with my own name is just confusing.

The problem with deleting the service and adding it again is that Visual Studio adds a new binding in app.config (among other things) which should not be there.

Anyone seen this problem before? Anyone knows of a solution to it?

like image 375
Nitramk Avatar asked Nov 03 '09 08:11

Nitramk


1 Answers

My error was that I forgot to add the OperationContract attribute.

like image 86
Erik K. Avatar answered Oct 02 '22 20:10

Erik K.