0
我想向我的服務添加MEX端點。當我啓動服務時,我得到WCF MEX Endpoint
WCF服務主機找不到任何服務元數據。這可能會導致 客戶端應用程序 運行不正確。請檢查是否啓用了元數據。你想 退出嗎?
這裏是我的配置文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<compilation debug="true" />
</system.web>
<system.serviceModel>
<services>
<service name="WcfServiceLibrary1.CustomerService"
behaviorConfiguration="Metadata">
<endpoint address=""
binding="wsHttpBinding"
contract="WcfServiceLibrary1.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="http://localhost:8000" />
</baseAddresses>
</host>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Metadata">
<serviceMetadata httpGetEnabled="true" />
</behavior>
<behavior>
<serviceMetadata httpGetEnabled="True"/>
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
任何人都知道爲什麼我仍然得到消息?
謝謝
什麼你的意思「當我啓動服務」嗎?你是如何託管服務:自我託管,IIS或使用主機內置的Visual Studio? –