Servicereferences.clientconfig changing values sil

2019-07-19 05:36发布

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?

标签: silverlight
1条回答
孤傲高冷的网名
2楼-- · 2019-07-19 06:21

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

查看更多
登录 后发表回答