silverlight - How can I remove the hard coding of the web service address from .ClientConfig files -


i have 5 silverlight projects in asp .net mvc 4 application. each of these projects, there web service passes data , silverlight control.

when deploy application on client's server, update .clientconfig file of each silverlight project changing address of web service.

that change -

<endpoint address="http://localhost:52213/schemereimbursementmasterservice.asmx"             binding="basichttpbinding" bindingconfiguration="schemereimbursementmasterservicesoap"             contract="schemeservicereference.schemereimbursementmasterservicesoap"             name="schemereimbursementmasterservicesoap" /> 

to -

<endpoint address="http://192.168.5.48/scheme/schemereimbursementmasterservice.asmx"             binding="basichttpbinding" bindingconfiguration="schemereimbursementmasterservicesoap"             contract="schemeservicereference.schemereimbursementmasterservicesoap"             name="schemereimbursementmasterservicesoap" /> 

then build , publish application.

so, in future, if address changes, have change in 5 .clientconfig files , build/publish again. there way can remove hardcoding figures out base part of url (i.e: http://192.168.5.48/scheme/) on own.

try using discovery , service anouncement features of wcf 4 or proxy service, here link - wcf 4 new features


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -