无法识别URI前缀。元数据包含无法解析的引用。

编程入门 行业动态 更新时间:2024-10-27 22:25:52
本文介绍了无法识别URI前缀。元数据包含无法解析的引用。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个WCF服务,它自托管在app.config以下的控制台应用程序中:

I have a WCF Service that self hosted in a console application with below app.config:

<?xml version="1.0" encoding="utf-8" ?> <configuration> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/> </startup> <system.serviceModel> <behaviors> <serviceBehaviors> <behavior name="serviceBehavior"> <serviceMetadata httpGetEnabled="false"/> </behavior> </serviceBehaviors> </behaviors> <services> <service name="TestService.Service" behaviorConfiguration="serviceBehavior"> <clear /> <endpoint address="net.tcp://127.0.0.1:7474/Service" binding="netTcpBinding" contract="TestService.IService"> </endpoint> <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="net.tcp://127.0.0.1:7474/Service" /> </baseAddresses> </host> </service> </services> </system.serviceModel> </configuration>

<运行此控制台程序后,我尝试通过添加来自另一个项目中的客户端应用程序的服务引用来连接此服务。 但是它说: 无法识别URI前缀。 元数据包含一个无法解析的引用:'net.tcp://127.0.0.1:7474/Service '。 套接字连接已中止。这可能是由于处理消息的错误或远程主机超出接收超时或基础网络资源问题引起的。本地套接字超时为'00:04:59.9359963'。 远程主机强行关闭现有连接 如果在当前解决方案中定义了服务,请尝试构建解决方案并再次添加服务参考。 有人可以告诉我这是什么问题吗? 我在谷歌搜索了几天但是没有

after I run this console program, i try to connect this service by adding service reference from a client application in another project. but it says: The URI prefix is not recognized. Metadata contains a reference that cannot be resolved: 'net.tcp://127.0.0.1:7474/Service'. The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:04:59.9359963'. An existing connection was forcibly closed by the remote host If the service is defined in the current solution, try building the solution and adding the service reference again. can someone tell me what's the problem ? I search in google a couple of days but nothing

推荐答案

更多推荐

无法识别URI前缀。元数据包含无法解析的引用。

本文发布于:2023-11-09 15:22:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572717.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:前缀   无法识别   数据   URI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!