标签: wcftestclient

Visual Studio Wcf测试客户端 - 输入Int数组

我发现Visual Studio WCF测试客户端在快速测试我的WCF服务时非常有用.这是相对于Visual Studio安装目录在此位置找到的测试客户端:

\ Common7\IDE\WcfTestClient.exe

我有一些服务调用需要System.Int32 []类型的参数
我似乎无法弄清楚要为此参数输入什么值,因为我一直收到错误

'[输入的值]'不是此类型的有效值

试图输入值27我尝试了以下,但都失败了

27
{27}
新的System.Int32 [] {27}

任何人都可以帮助如何做到这一点

wcf wcftestclient visual-studio

90
推荐指数
1
解决办法
2万
查看次数

WCFTestClient HTTP请求未经授权,客户端身份验证方案为"匿名"

我创建了一个WCF服务并将其部署在Server上.当我浏览这个服务时,它使用?wsdl URL给出了积极的回应.现在我正试图通过WCF测试客户端测试服务.它显示正确的元数据.但是当我尝试从服务中调用任何方法时,它会向我显示异常...这里是堆栈跟踪的错误细节.

HTTP请求未经授权,客户端身份验证方案为"匿名".从服务器收到的身份验证标头是"Negotiate,NTLM".

服务器堆栈跟踪:


System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest请求,HttpWebResponse响应,WebException responseException,HttpChannelFactory factory)
HTTP请求未经授权使用客户端身份验证方案"Anonymous".从服务器收到的身份验证标头是"Negotiate,NTLM".

服务器堆栈跟踪:


System.ServiceModel.Channels.HttpChannelUtilities.ValidateAuthentication(HttpWebRequest请求,HttpWebResponse响应,WebException responseException,HttpChannelFactory工厂)

客户端绑定:

<bindings>
    <wsHttpBinding>
        <binding name="WSHttpBinding_IServiceMagicService" closeTimeout="00:01:00"
            openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
            bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
            maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
            messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
            allowCookies="false">
            <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                maxBytesPerRead="4096" maxNameTableCharCount="16384" />
            <reliableSession ordered="true" inactivityTimeout="00:10:00"
                enabled="false" />
            <security mode="None">
                <transport clientCredentialType="Windows" proxyCredentialType="None"
                    realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true"
                    establishSecurityContext="true" />
            </security>
        </binding>
    </wsHttpBinding>
</bindings>
Run Code Online (Sandbox Code Playgroud)

服务器绑定:

<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding_SEOService" closeTimeout="00:10:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:10:00" bypassProxyOnLocal="true" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="999524288" maxReceivedMessageSize="655360000" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
      <readerQuotas maxDepth="32" maxStringContentLength="900000" …
Run Code Online (Sandbox Code Playgroud)

wcf ntlm anonymous wcftestclient negotiate

63
推荐指数
5
解决办法
24万
查看次数

是否可以强制WCF测试客户端接受自签名证书?

我有一个使用自签名证书在IIS 7中运行的WCF Web服务(这是一个概念证明,以确保这是我想要的路线).它需要使用SSL.

是否可以使用WCF测试客户端调试此服务而无需非自签名证书?

当我尝试时,我收到此错误:

错误:无法从https:///Service1.svc获取元数据如果这是您有权访问的Windows(R)Communication Foundation服务,请检查您是否已在指定地址启用元数据发布.有关启用元数据发布的帮助,请参阅http://go.microsoft.com/fwlink/?LinkId=65455上的MSDN文档 .WS-Metadata Exchange错误URI:https:///Service1.svc元数据包含一个引用无法解决:'https:///Service1.svc'.无法与具有权限''的SSL/TLS安全通道建立信任关系.底层连接已关闭:无法为SSL/TLS安全通道建立信任关系.根据验证程序,远程证书无效.HTTP GET错误URI:https:///Service1.svc下载"https:///Service1.svc"时出错.底层连接已关闭:无法为SSL/TLS安全通道建立信任关系.根据验证程序,远程证书无效.

编辑:此问题具体是关于使用WCF测试客户端使用自签名证书测试已通过SSL保护的Web服务.服务器已经设置为接受所提供的任何证书,这是WCF测试客户端我没有看到这样做的方法.

ssl wcf wcftestclient self-signed ssl-certificate

28
推荐指数
3
解决办法
3万
查看次数

WCF:如何禁用WCF测试客户端

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

  1. 如果svc文件已打开并按F5,则会打开Web浏览器
  2. 如果文件后面的代码当前打开并按F5,则会打开WCF测试客户端.

为什么会有不同的行为?我不想使用Test Client,如何在应用程序中禁用它,以便它不会再来.

Atul Sureka

wcf wcftestclient

20
推荐指数
2
解决办法
2万
查看次数

如何禁用WCF测试客户端 - VS 2012

我有一个新的WCF服务应用程序,当我点击F5进行调试时,WCF测试客户端总是出现,但我想禁用它,因为我使用soapUI进行测试.

我在这里尝试了答案 - /sf/answers/590932121/但是这个XML节点已经不在VS 2012的项目文件中了.我自己也尝试过其他一些东西,例如更改默认启动页面并尝试强制调试以启动浏览器会话.

wcf wcftestclient visual-studio-2012

17
推荐指数
3
解决办法
2万
查看次数

WCF REST服务在WCFTestClient中不可见

我已经为我的原型服务成功配置了3个端点.端点是basicHttpBinding,wsHttpBinding和webHttpBinding.我目前唯一的故障是WCFTestClient.当我将它指向我的服务时,它会列出前两个,但不会列出webHttpBinding.我可以通过浏览器测试REST端点,它工作得很好.这是我的配置:

 <system.serviceModel>
    <services>
      <service behaviorConfiguration="serviceBehaviour" name="VMDServices.VMDService">
        <endpoint binding="webHttpBinding"
                  address="rest" behaviorConfiguration="webBehaviour" contract="VMDServices.IService1">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
        <endpoint binding="basicHttpBinding"
                  address="basic" bindingConfiguration="basicBinding" contract="VMDServices.IService1">
        </endpoint>
        <endpoint binding="wsHttpBinding"
                  address="ws" bindingConfiguration="wsBinding" contract="VMDServices.IService1">
          <identity>
            <dns value="localhost"/>
          </identity>
        </endpoint>
      </service>
    </services>

    <bindings>
      <basicHttpBinding>
        <binding name="basicBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <security mode="None"></security>
          <readerQuotas maxStringContentLength="2147483647"/>
        </binding>
      </basicHttpBinding>
      <wsHttpBinding>
        <binding name="wsBinding" transactionFlow="true">
          <security mode="None"></security>
          <reliableSession enabled="true" ordered="true" />
        </binding>
      </wsHttpBinding>
    </bindings>

    <behaviors>
      <endpointBehaviors>
        <behavior name="webBehaviour">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="serviceBehaviour">
          <!-- To avoid disclosing metadata information, set the value below …
Run Code Online (Sandbox Code Playgroud)

wcf wcftestclient webhttpbinding wcf-rest

16
推荐指数
1
解决办法
2万
查看次数

复制到其他计算机时,无法在WcfTestClient中添加服务

我想在不安装VS2012的情况下在另一台机器上运行WcfTestClient(VS2012附带的一个).这可能吗?在机器上我安装了.NET 4.5,但是当我尝试添加Web服务时,它给了我以下堆栈跟踪:

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Tools.Common.SdkPathUtility.GetRegistryValue(String registryPath, String registryValueName)
   at Microsoft.Tools.Common.SdkPathUtility.GetSdkPath(Version targetFrameworkVersion)
   at Microsoft.Tools.TestClient.ToolingEnvironment.get_MetadataTool()
   at Microsoft.Tools.TestClient.ServiceAnalyzer.GenerateProxyAndConfig(String projectPath, String address, String configPath, String proxyPath, Int32 startProgressPosition, Int32 endProgressPostition, BackgroundWorker addServiceWorker, String& errorMessage)
   at Microsoft.Tools.TestClient.ServiceAnalyzer.AnalyzeService(String address, BackgroundWorker addServiceWorker, Single startProgress, Single progressRange, String& errorMessage)
   at Microsoft.Tools.TestClient.Workspace.AddServiceProject(String endpoint, BackgroundWorker addServiceWorker, Single startProgress, Single progressRange, String& error)
   at Microsoft.Tools.TestClient.AddServiceExecutor.Execute(AddServiceInputs inputs, Workspace workspace, BackgroundWorker addServiceWorker)
   at Microsoft.Tools.TestClient.UI.MainForm.addServiceWorker_DoWork(Object sender, DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs …
Run Code Online (Sandbox Code Playgroud)

.net wcf exception-handling wcftestclient visual-studio-2012

16
推荐指数
1
解决办法
3007
查看次数

WCF服务方法在WCF测试客户端中不可用,因为它使用类型

我正在尝试使用WCF测试客户端来测试我已构建的WCF服务.

该服务有一个方法"SubmitRequest".

[OperationContract]
Response SubmitRequest(Request request);
Run Code Online (Sandbox Code Playgroud)

当我加载WCF测试客户端时,该方法显示为灰色,并显示消息"WCF测试客户端不支持此操作,因为它使用类型WcfLibrary.Objects.Request

下面是类型定义,有人看错了吗?

[DataContract]
public class Request
{
    [DataMember]
    public string LoanNumber { get; set; }

    [DataMember]
    public string ClientCode { get; set; }

    [DataMember]
    public Region Region { get; set; }

    [DataMember]
    public RequestType RequestType { get; set; }

    [DataMember]
    public List<RequestParameter> RequestParameters { get; set; }

    [DataMember]
    public List<MspWebCallType> MspWebCallsForXmlRequest { get; set; }

    [DataMember]
    public Hashtable XmlRequestParameters { get; set; }

    public Request(string loanNumber, string clientCode, Region region, RequestType requestType, List<RequestParameter> requestParameters) …
Run Code Online (Sandbox Code Playgroud)

.net c# wcf wcftestclient operationcontract

14
推荐指数
1
解决办法
2万
查看次数

使用WCFTestClient测试简单WCF Web服务的WCF错误

当我尝试使用"wcftestclient"测试AutoLotWCFService时,出现以下错误.我究竟做错了什么?任何见解都会有所帮助 这是一个简单的Web服务,它具有带接口契约的wshttpbinding和服务中的实现.以下是长错误消息:Web.Config文件有2个端点 - 一个用于Web服务本身,另一个用于metaDataExchange.它几乎都是默认的东西.如果需要,我可以包含代码 - 似乎我不能在这里附加文件.


Error: Cannot obtain Metadata from http://localhost/AutoLotWCFService/Service.svc
If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address.  
For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error
    URI: http://localhost/AutoLotWCFService/Service.svc
    Metadata contains a reference that cannot be resolved: 'http://localhost/AutoLotWCFService/Service.svc'.
    The remote server returned an unexpected response: (405) Method not allowed.
    The remote server returned …
Run Code Online (Sandbox Code Playgroud)

wcf using wcftestclient

13
推荐指数
2
解决办法
6万
查看次数

WCF测试客户端有哪些替代品?

我觉得测试我的WCF服务应该更容易.

是否有WCF测试客户端的替代方案?

有这些功能的东西:

  1. 可以保存我的对象树(方法参数)以便再次使用.
  2. 理想情况下,它甚至可以让我识别需要在每次运行时重新生成的GUID以及应保持静态的GUID.
  3. 更容易处理数组,列表和可空类型.(例如,如果我有一个可空类型的数组,我必须输入数组的长度,并且在我可以填充值之前每个都不为null.看起来应该有一个更简单的方法... .)
  4. 可以在运行之间保存"配置文件".(我的服务返回的数据多于MaxBufferSize和MaxReceivedMessageSize中的标准65,536.)

免费是最好的,但如果我需要付钱才能得到一个好的工具,我会考虑它.

wcf wcftestclient

13
推荐指数
2
解决办法
9121
查看次数