WCF 测试客户端 - 无法编辑配置文件

发布于 2024-10-19 06:42:47 字数 162 浏览 3 评论 0 原文

我们当前遇到一个问题,需要修改客户端端点配置文件,但在 WCF 测试客户端中找不到执行此操作的方法。有没有办法修改WCF测试客户端中的配置文件?

我读到您应该能够右键单击并选择编辑,但此选项不可用。

运行 Visual Studio 2008(没有 SP1 - 请不要问为什么)

We are currently experiencing an issue that requires the client endpoint configuration file to be modified but can't find a way to do this in the WCF test Client. Is there a way to modify the Config file in the WCF Test Client?

I have read that you should be able to right click and select edit but this option is not available.

Running Visual Studio 2008 (without SP1 - please don't ask why)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

一场信仰旅途 2024-10-26 06:42:47

要在 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文