views:

108

answers:

1

I am writing a Silverlight 3 application, this app uses a service reference to connect to a SharePoint site by using Sharepoint Lists.asmx web service

Now i want to install my app on different servers, and i want my app to use the weBservice of the server on which it is installed (without me specifying it). In Vs2005, we used to specify "dynamic" for the webservice. How can i do this in Visual Studio 2010 (service reference)? there is no "dynamic" property for a service reference.

Thanks,

A: 

You can use the ChannelFactory class to accomplish this as you can specify the endpoint when constructing the factory.

MattK
WS.ListsSoapClient sc = new WS.ListsSoapClient(); sc.Endpoint.Address = new System.ServiceModel.EndpointAddress(<specify address here>);
Zee99