刷新服务引用更新 app.config [英] Refreshing service references updates the app.config

查看:39
本文介绍了刷新服务引用更新 app.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每次我更改我的 WS 并更新 Visual Studio 中的引用时,VS 都会用其他不必要的信息覆盖我的 app.config.因此,当我之后启动我的客户端时,出现此错误:

Every time I make changes to my WS and update the reference in Visual Studio, VS overwrites my app.config with additional unnecessary information. So when I start my client afterwards, I get this error:

在处理标题时发现错误

代码生成器所做的更改是从每个绑定中删除这一行(注意我使用的是 customBinding/httpsTransport):

The changes that the code generator made was to remove this line from every binding (note I'm using customBinding/httpsTransport):

<security authenticationMode="UserNameOverTransport" includeTimestamp="false">
    <secureConversationBootstrap/>
</security>

然后我必须关闭客户端,恢复 app.config 更改并重新启动客户端,这很麻烦.

Then I have to close the client, revert the app.config changes and restart the client which is a hassle.

我更希望 app.config 单独存在.

I would prefer if the app.config would be left alone.

您是否遇到了同样的问题?您有解决方法吗?

Are you experiencing the same problem and do you have a workaround?

推荐答案

最终以编程方式解决了这个问题.

Ended up doing this programmatically which solved the problem.

这篇关于刷新服务引用更新 app.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆