【发布时间】:2011-08-28 17:14:46
【问题描述】:
我有一个成功运行的 WCF 服务,我可以使用 javascript 调用它。但是我想使用 WCF 测试客户端调用它,我很难做到这一点。有人告诉我,我需要确保已在指定地址启用元数据发布。阅读文档后,我只是看不出我的意思是我的配置:
<system.serviceModel>
<services>
<service name="CommentSessionIDWCFService"
behaviorConfiguration="CommentSessionIDBehavior">
<endpoint
address=""
behaviorConfiguration="CountryProvinceBehavior"
binding="webHttpBinding"
contract="ICommentSessionIDWCFService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CommentSessionIDBehavior">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="CountryProvinceBehavior">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
</system.serviceModel>
我已阅读其他帖子,但我看不到要填充的内容,而且我不断收到错误消息。 Q的..
-
我是否正确地说我需要在我的配置中配置一个全新的服务来显示元数据?
-
我应该在配置中添加什么来发布此元数据以便我可以使用客户端调用?
【问题讨论】:
-
感谢编辑 mark 你是怎么整理的?标签按钮对我不起作用...