WCF 测试客户端 - 无法编辑配置文件
我们当前遇到一个问题,需要修改客户端端点配置文件,但在 WCF 测试客户端中找不到执行此操作的方法。有没有办法修改WCF测试客户端中的配置文件?
我读到您应该能够右键单击并选择编辑,但此选项不可用。
运行 Visual Studio 2008(没有 SP1 - 请不要问为什么)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在 WcfTestClient 中编辑客户端配置,请右键单击列出的服务下方的客户端配置,然后选择“使用 SvcConfigEditor 编辑”。右键单击“客户端配置”时,“使用 SvcConfigEditor 编辑”是否灰显或丢失?
以下是有关 .Net 3.5 的 WcfTestClient 的详细信息的链接:http://msdn.microsoft.com/en-us/library/bb552364(v=VS.90).aspx
更新
SP1 中添加了“使用 SvcConfigEditor 编辑” ,但您可以尝试以下操作进行手动更改:
来自 http://social.msdn.microsoft.com/forums/en-US/wcf/thread/dde72fbe-e741-48fd-a9e1-253800d5227a/ Herve Roggero 建议这样做:
嗯,我也面临着类似的挑战。在工具更新之前,可以通过手动方式执行此操作。
使用 WCF 服务 HTTP 启动客户端界面 (WcfTestClient.exe)
展开服务并右键单击 Web.Config(不要双击 - 这将加载配置文件)
单击复制完整路径
转到文件并编辑您需要更改的配置部分(缓冲区限制、https 的 dns 身份...)
您现在可以开始使用带有修改后的配置文件的工具。
不幸的是,每次重新启动该工具时,都会在不同的文件夹中生成新的配置文件。所以这是一个手动步骤。尽管如此,它还是帮助我测试了需要更改配置文件的 HTTPS 端点。
希望这有帮助
To edit the client config in WcfTestClient, right click on the Client Config below the listed service and select "Edit with SvcConfigEditor". Is the "Edit with SvcConfigEditor" greyed out or missing when you right click on Client Config?
Here is a link on more information about WcfTestClient for .Net 3.5: http://msdn.microsoft.com/en-us/library/bb552364(v=VS.90).aspx
Update
The "Edit with SvcConfigEditor" is added in SP1, but you can try the following to make manual changes:
From http://social.msdn.microsoft.com/forums/en-US/wcf/thread/dde72fbe-e741-48fd-a9e1-253800d5227a/ Herve Roggero suggested this:
Well, I was facing a similar challenge. There is a manual way to do this until the tool gets updated.
Start the client interface (WcfTestClient.exe) with the WCF Service HTTP
Expand the service and right-click on the Web.Config (do not double-click - this will load the config file)
Click on Copy Full Path
Go to the file and edit the configuration sections you need to change (buffer limits, dns identity for https...)
You can now start using the tool with a modified config file.
Unfortunately everytime you restart the tool a new config file gets generated in a different folder. So this is a manual step. Still it helped me test an HTTPS endpoint that required changing the config file.
Hope this helps