Reputation: 488
I'm relying on a server backend for my WP7 app. The server part is to be installed by the administrator on a host computer (not important).
I have to change the url in the app dynamically the first time the app is running on the phone (the user will be prompted to enter the url, and it will be saved in the isolated storage on the phone)
Question is: How do I change the url from the default app to point to the new url given by the user.
The webservice is a WCF service which holds all the data properties and collections, those I need in my app. Let me know if
Upvotes: 0
Views: 568
Reputation: 488
Actually I needed to change the url on the generated *Client. So it looks like:
client.Endpoint.Address = new EndpointAddress(new Uri("http://server/service.svc);
Upvotes: 2
Reputation: 466
Assuming its the same as full .NET, try this
WebSerivce.url = UrlFromUser.
Upvotes: 0
Reputation: 1929
If you're using c# you can change the service url by changing the url property on you serviceobject.
Service myService = new Service();
myService.Url = UrlToService;
myService.doLotsOfStuff();
Upvotes: 0