开发者

WCF: Add service reference on client pulls the wrong information from hosted service

We had a Windows Service Project hosting two of our WCF services and we could not figure out why the app.config settings on the WCF services were not pulling correctly to our client programs.

It turns out that the app.config for the windows service project takes precedent. When we moved the settings we wanted into the window service's app.config everything worked again.

Hope this saves someone a 4 hour lon开发者_运维技巧g headache!


You must copy configuration to hosting application. Only configuration from hosting application is applied. Configuration in WCF services is only for testing purpose like WCFTestClient.


If I remember correctly, the reason for this is because ConfigurationManager does not support config files inside dll's.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜