Search code examples
web-servicesasp.net-2.0

change asp.net 2 web service address


I'm developing an application that includs a web service, on development time I run the service locally on my pc, than I publish the service to a remote server, I wanna know how can I take the web reference that I got and just change the address of the service to the remote server to check that every thing is ok


Solution

  • You can set the service URL usign the Url property:

    MyWebService.Service1 service = new MyWebService.Service1();
    service.Url = NEWSERVICEURL;