0

As we are working locally so our service link is: http://localhost:8012/webservice.asmx

When we deploy the webservice on our service, we have to remove the local web service and then add the web service link again for example: http://test.com/webservice.asmx.

It is not convenient to remove the web service reference and add it again. Is there any elegant solution?

John Saunders
  • 160,644
  • 26
  • 247
  • 397
olidev
  • 20,058
  • 51
  • 133
  • 197
  • 1
    possible duplicate of [ASMX: setting the website at runtime](http://stackoverflow.com/questions/2997885/asmx-setting-the-website-at-runtime) – John Saunders Feb 23 '12 at 02:38

1 Answers1

1
YourService service = new YourService();
service.Url = "http://some.other.url/";
olidev
  • 20,058
  • 51
  • 133
  • 197