WCF:如何禁用 WCF 测试客户端 [英] WCF : How to disable WCF Test Client

查看:49
本文介绍了WCF:如何禁用 WCF 测试客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个新的 WCF 应用程序.它有一个 svc 文件 &后面的代码,当我尝试调试(F5)时,我看到以下内容.

I created a new WCF Application. It has a svc file & a code behind, When I try to debug (F5) then I see the following.

  1. 如果 svc 文件已打开 &按 F5 然后它打开网络浏览器
  2. 如果文件隐藏代码当前已打开&按 F5,然后 WCF 测试客户端打开.

为什么会有不同的行为?我不想使用测试客户端,如何在应用程序中禁用它以便它不会再次出现.

Why there are different behavior? I do not want to use Test Client, how to disable it in the app so that it would not come again.

阿图尔·苏雷卡

推荐答案

打开你的项目属性,转到调试选项卡,在开始选项下你会看到类似/client:"WcfTestClient.exe"

Open your project properties, go to the Debug tab, under start options you will see something like /client:"WcfTestClient.exe"

删除该行.

对于 WCF 服务应用程序和 WCF 工作流服务应用程序,您需要修改 .csproj.user 文件.完整的文章可以在这里找到.

For a WCF Service Application and WCF Workflow Service Application you need to modify the .csproj.user file. A full write up can be found here.

关键部分是

    <WebProjectProperties>
      <EnableWcfTestClientForSVC>False</EnableWcfTestClientForSVC>
    </WebProjectProperties>

这篇关于WCF:如何禁用 WCF 测试客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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