任何人都可以告诉我为什么我在尝试添加我的服务时遇到此错误?WCF测试客户端无法添加服务,无法获取元数据
Error: Cannot obtain Metadata from http://myserver/myapp . If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455 . WS-Metadata Exchange Error URI: http://myserver/myapp Metadata contains a reference that cannot be resolved: ' http://myserver/myapp '. The remote server returned an unexpected response: (405) Method Not Allowed. The remote server returned an error: (405) Method Not Allowed.HTTP GET Error URI: http://myserver/myapp There was an error downloading ' http://myserver/myapp '. The request failed with HTTP status 403: Forbidden.
更新:我有以下的终结点已有,
<endpoint address="mex"
binding="mexHttpBinding"
name="Metadata"
contract="IMetadataExchange" />
我也有服务行为设置:
<serviceBehaviors>
<behavior name="myBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
尝试关注我发布的链接中的视频。当我遇到同样的错误时,他们为我工作 – 2012-02-02 19:36:14