【发布时间】:2014-12-03 00:52:01
【问题描述】:
使用 svcutil 工具为我的应用程序创建 WCF 客户端库时出现以下错误。我可以在本地计算机上成功执行相同的操作,但不能在具有 IIS 的服务器上执行相同的操作。
C:\Program Files (x86)\Microsoft Visual Studio 12.0>svcutil.exe http://beanie.elasticbeanstalk.com/beanie/beanie.svc?wsdl Microsoft (R) 服务模型元数据工具 [Microsoft (R) Windows (R) Communication Foundation,版本 4.0.30319.33440] 版权所有 (c) 微软公司。保留所有权利。
尝试从以下位置下载元数据 'http://beanie.elasticbeanstalk.com/ beanie_deploy/beanie.svc?wsdl' 使用 WS-元数据交换或 DISCO。 Microsoft (R) 服务模型元数据 工具 [Microsoft (R) Windows (R) Communication Foundation,版本 4.0.30319.33440] 版权所有 (c) Microsoft Corporation。保留所有权利。
错误:无法从 http://beanie.elasticbeanstalk.com/beanie_deploy/beanie.svc?wsdl
如果这是您使用的 Windows (R) Communication Foundation 服务 可以访问 ss,请检查您是否启用了元数据发布 在指定的地址。如需帮助启用元数据发布, 请参阅 MSDN 文档 http://go.microsoft.com/fwlink/?LinkId=65455.
WS-元数据交换错误 网址:http://beanie.elasticbeanstalk.com/beanie_deploy/beanie.svc?wsdl
Metadata contains a reference that cannot be resolved: 'http://beanie.elasticbeanstalk.com/beanie_deploy/beanie.svc?ws dl'。
Content Type application/soap+xml; charset=utf-8 was not supported by servic ehttp://beanie.elasticbeanstalk.com/beanie_deploy/beanie.svc?wsdl。客户端和服务绑定可能是 不匹配。
The remote server returned an error: (415) Cannot process the message becaus e the content type 'application/soap+xml;charset=utf-8' 不是预期的类型 'text/xml; charset=utf-8'..
HTTP GET 错误 网址:http://beanie.elasticbeanstalk.com/beanie_deploy loy/beanie.svc?wsdl
The document was understood, but it could not be processed.- WSDL 文档包含无法解析的链接。 - 下载“http://win-iu76ruu909k /beanie_deploy/beanie.svc?xsd=xsd0”时出错。 - 无法解析远程名称:'win-iu76ruu909k'
如果您需要更多帮助,请输入“svcutil /?”
我可以做些什么来开始修复它们?
编辑:web.config 文件
<behaviors> <serviceBehaviors> <behavior name="NewBehavior0"> <serviceMetadata httpGetEnabled="true" /> </behavior> </serviceBehaviors> </behaviors> <services> <service behaviorConfiguration="NewBehavior0" name="Syncre_LayerAB_WebService.LayerAB_WebService"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="" contract="Syncre_LayerAB_WebService.ILayerAB_WebService" /> </service> </services>
【问题讨论】:
-
如果没有来自服务器上 WCF 服务的
节点,很难找出可能出现的问题。 -
谢谢,我刚刚做了编辑
标签: .net web-services wcf iis svcutil.exe