tags:

views:

54

answers:

1

There is a WCF service that I was using and now it is pointing to a new URL. Is there anyway to go and change the URL without having to delete the service from the project and add it again using the new URL.

The problem with deleting the service is stupid TFS is giving problems. Any suggestions how I can update the service url without deleting the service?

+4  A: 

In general the url a client is pointing to is defined in the app/web.config using the endpoint element. So all you have to do is modify the address attribute to point to the new url:

<endpoint address="http://newUrl" 
          binding="..." 
          contract="..." />
Darin Dimitrov
Thanks I just did that! Now I get a new error saying => The remote server returned an unexpected response: (400) Bad Request.Thanks!
azamsharp
This could be because the service contract has also been modified. If this is the case you will need to regenerate the client proxy.
Darin Dimitrov