如何在服务运行时运行 WCF 测试客户端
我有一个 WCF 项目。当我运行它时,有时会启动 WCF 测试客户端,有时则不会。
如何将 WCF 测试客户端设置为始终打开?
I have a WCF project. When I run it sometimes launches the WCF Test Client and sometimes it does not.
How can I set the WCF Test Client to always open?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
MLF 的答案中的链接确实包含很好的信息,绝对值得一读。然而,我花了一段时间才找到我正在寻找的具体答案,大约在页面的中间:
这在 Visual Studio 2015 中仍然适用。
The link in MLF's answer does contain good information, and is definitely worth a read. However, it took me a while to find the specific answer I was looking for, which is about halfway down the page:
This still holds true in Visual Studio 2015.
请查看 WCF 工具团队博客
启动 WCF 测试客户端的提示
Have look at this article from the WCF Tools Team Blog
Tips for Launching WCF Test Client
值得注意的是,由项目模板在 svc.cs 文件中生成的注释:
还可以使用该提示,通过指定 svc- 使 WCF 测试客户端每次启动(无论当前聚焦的文件是什么)文件作为开始操作。
转到“项目属性”、“Web”,并将“特定页面”设置为您的 svc 文件。
It's worth noticing the comment, generated by the project template at one's svc.cs-file:
One can also use that hint, to make WCF Test Client start each and every time (regardless of the currently focused file) by specifiying the the svc-file as start action.
Go to your "project properties", "Web", and set "Specific Page" to your svc-file.