WCF分布式开发常见错误(3):客户端调用服务出错:You have tried to create a channel to a service that does not support .Net Framing
Posted on 2009-03-15 23:40 Frank Xu Lei 阅读(410) 评论(0) 编辑 收藏 网摘所属分类: WCF分布式开发常见错误<!--<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"xmlns:dc="http://purl.org/d
·
Posted on 2009-03-15 23:40 Frank Xu Lei 阅读(410) 评论(0) 编辑 收藏 网摘 所属分类: WCF分布式开发常见错误
我们手动编码使用客户端调用WCF服务的时候会出现服务不支持 .Net Framing的错误,
具体信息如下:
You have tried to create a channel to a service that does not support .Net Framing. It is possible that you are encountering an HTTP endpoint.

解决办法:
检查宿主进程里,WCF服务的终结点地址例如:Uri httpAddress = new Uri(http://localhost:8002/WCFService);
使用的绑定协议为HTTP,客户端在调用WCF服务的时候必须使用相应的HTTP协议。修改后就可以正确调用服务。
更多推荐

所有评论(0)