开发者

How to update an XBAP’s config file after deployment

Here is my scenario and would love any feedback.

We have a WPF XBAP application which gets hosted on our customer's IIS server on which we as a vendor do not have any control over. So as a part of configuration, clients first need to configure the WCF service to point to the proper endpoints. Default location for the service is say "http://localhost/XYZ.svc" which needs to change to proper adderess such as "http://USC.intl.edu/XYZ.svc" (offcourse our service is not called XYZ, just using that name as an example).

Problem in our test scenario is as soon as we change these values in the开发者_StackOverflow中文版 config file (Appname.exe.config) the manifest file becomes invalid and we start getting errors.

The solutions that I have looked at talk about mageui.exe. Our clinets may not have this utility. So how can we achieve this without using this utility and have the app be configurable.

Any input will be appreciated.

Thanks,

Salil


Salil,

Not sure if this will help you, but when configuring WCF bindings, you're not limited to default Application config setings. An option could be to store the location setting in a custom config file and/or overwrite it programmatically, as needed...

Here are some interesting ideas that might help you and should work with XBAP as well; but I don't know if it actually does.

WCF Configuration - Split it out of app.config

Update
You could try do use a second config file for WCF bindings as described here (link see in comment). I got the Information from the topic above (thanks to davogones). Hope it works for XBAP as well.

Good luck!

Best regards,
Thomas

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜