首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法通过SvcUtil.exe使用WCF

无法通过SvcUtil.exe使用WCF
EN

Stack Overflow用户
提问于 2014-03-09 19:27:45
回答 1查看 827关注 0票数 0

我有一个wcf网络服务,这是启动和运行。我还有一个visual studio 2012。我尝试按照以下教程在控制台应用程序中使用wcf wcf服务:

http://www.csharptutorial.in/2012/01/cnet-how-to-consume-wcf-web-service-in.html#.UxxME_6x6JA

第一步之一是运行这个SvcUtil.exe命令:

微软“C:\Program Files\C:\WcfFiles> SDKs\Windows\v6.0A\Bin\SvcUtil.exe”http s://service.mycompany.nl/PortalService.svc?wsdl

我得到了这个错误:

代码语言:javascript
复制
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation.  All rights reserved.

Attempting to download metadata from 'https://service.mycompany.nl/PortalServic
e.svc?wsdl' using WS-Metadata Exchange or DISCO.
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.648]
Copyright (c) Microsoft Corporation.  All rights reserved.

Error: Cannot obtain Metadata from https://service.mycompany.nl/PortalService.s
vc?wsdl

If this is a Windows (R) Communication Foundation service to which you have acce
ss, please check that you have enabled metadata publishing at the specified addr
ess.  For help enabling metadata publishing, please refer to the MSDN documentat
ion at http://go.microsoft.com/fwlink/?LinkId=65455.


WS-Metadata Exchange Error
    URI: https://service.mycompany.nl/PortalService.svc?wsdl

    Metadata contains a reference that cannot be resolved: 'https://service.mycompany.nl/PortalService.svc?wsdl'.

    The HTTP request is unauthorized with client authentication scheme 'Anonymou
s'. The authentication header received from the server was 'Basic realm="service
.mycompany.nl"'.

    The remote server returned an error: (401) Unauthorized.


HTTP GET Error
    URI: https://service.mycompany.nl/PortalService.svc?wsdl

    The document was understood, but it could not be processed.
  - The WSDL document contains links that could not be resolved.
  - There was an error downloading 'https://sehapp01.dmz.rubicongroup.local/SEHP
ortalService.svc?wsdl=wsdl0'.
  - The underlying connection was closed: Could not establish trust relationship
 for the SSL/TLS secure channel.
  - The remote certificate is invalid according to the validation procedure.

If you would like more help, type "svcutil /?"

C:\WcfFiles>
EN

回答 1

Stack Overflow用户

发布于 2014-03-09 19:34:35

尝试使用WcfTextClient来使用Wcf。

位于以下路径: C:\Program Files (x86)\Microsoft Visual Studio11.0\Common7\IDE

在那里你会找到WcfTestClient。

打开它,运行您的Wcf,然后在WcftextClient中启动服务,在那里您将能够消费和调用方法;)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22281597

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档