Question

How can i get the address of the service reference. For instance i have a service reference named profile and its address is :

http://hostname/services/profile.svc

How can i get get this address in c# by specifying the service name, in this case "profile"? so far i have tried

new profile.profileServiceClient()

and tried to find anything useful from the watch list but didn't get anything useful.

This might not be a good question but its very useful for me. Will really appreciate your help.

Was it helpful?

Solution

can u try this, create an object of serviceclient and then use the EndPoint.Address.Uri property

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top