當我瀏覽到.svc時,我不斷收到錯誤:此服務的元數據發佈當前已禁用。直接瀏覽時WCF元數據不可用
我遵循了錯誤頁面上列出的所有說明(添加了行爲,引用行爲,添加了mex端點,嘗試使用和不使用baseaddress)以及MSDN上的說明:http://msdn.microsoft.com/en-us/library/ms734765.aspx(幾乎相同,但包括政策)。我甚至燒燬了我的配置文件,只留下了這個東西 - 它根本沒有任何區別。我已經確認配置文件正在被使用(即在其中發生錯誤,並且錯誤發生變化)。
節的樣子:
<system.serviceModel>
<services>
<service name="HoldingService" behaviorConfiguration="SimpleServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost/xxxx.cdf.holding/HoldingService.svc"/>
</baseAddresses>
</host>
<endpoint address=""
binding="basicHttpBinding"
contract="Xxx.Xxxx.Schema.Service.Cdf.Holding.IHoldingService" />
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="SimpleServiceBehavior">
<serviceMetadata httpGetEnabled="True" policyVersion="Policy15" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
有什麼辦法都解決或調試呢?
FWIW,系統是運行IIS 5.1和VS2010的WinXP。 – Mark