views:

66

answers:

3

Hi, I am in a situation in which I have to move web applications/web services from one server to another. The applications/services are published and most server names can be modified in the web.config. However I was wondering what happens to the web services who are pointed to the previous server? Will I have to open the project and re-add the new service at the new server? Is this clear? Thanks for anyhelp.

+1  A: 

Oliver - as asked I don't think there is enough information because the answer seems pretty clear: if a service isn't found on a target server then you'll get an exception. You do not have to "re-add the new service..." if you have configured your app so that the service address is pulled from Web.Config. You just need to ensure that the change of address in the Web.config propagates through to the web service call in your app. Am I missing something?

Mark Brittingham
A: 

You mean the web references? No you can change the address on the Web Reference URL field in the properties of the web reference. Actually this is only necessary when updating the web reference, to build the proxies.

Gerrie Schenck
A: 

You should configure your web service URL's to a parameter table or web.config file.

Then in your application get URL from web.config or parameter table and set it to your web service proxy's Url parameter.

Like This :

MyWebService myWebService = new MyWebService();
myWebService.Url = "http://127.0.0.1/MywebService/Service1.asmx";

When you want to deploy your application to another server, just change the URL parameters.

Canavar