المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : how to call a method in web service without adding service reference to the code



C# Programming
06-27-2013, 06:52 AM
Hi every one
I know it may seem strange but I am using a web service inside a lan for my project. The service written by Visual Studio C# as a WCF project. I have added the service reference to my clients and they can easily call methods in the web service.
Now, the IP of the server hosting the web service is able to be changed, and when It changes, the service is not callable any more.
I plan to find a way to eliminate calling the web service using "service reference" in client and want to place an external txt or xml file to contain the URL of web service so that I can change it when the ip address of the web service changed.

What is the way to call a wcf base web service without hard coding the service reference in the design time?!

I appreciate any help