任何人都可以告訴我爲什麼我在嘗試添加我的服務時遇到此錯誤?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