Servicereferences.clientconfig changing values silverlight

為{幸葍}努か 提交于 2020-01-04 06:13:22

问题


I have a servicereference.clientconfig.

Now my install team is creating an install for my silverlight application. It is an issue because in the servicereference.clientconfig there is a set of web services and they all point to localhost.

What is the easiest way to set this to the server that the install is going to?

Off the top of my head the install script would have to unzip the xap file, modify servicereference.clientconfig. then rezip. Is this really the easiest way?


回答1:


I can't tell 100%, but it sounds like the services are running on the same server that you are deploying the app too. If that's the case - are you using SL4? If so, it supports relative addresses in the ClientConfig, like so:

"../Service1.svc"

This would resolve Service1.svc in the directory above your ClientBin directory. The upshot of this is that the same configuration can be usd in your local dev environment and in production.

http://msdn.microsoft.com/en-us/library/cc197941(VS.95).aspx?ppud=4



来源:https://stackoverflow.com/questions/4136802/servicereferences-clientconfig-changing-values-silverlight

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!