0
我已添加帮助页面端点,如example on MSDN,我的元数据交换端点停止工作。这里异常的详细信息,当我尝试看到的元数据http://imgur.com/delete/HYe9c9OocABgxOj如果没有这一切的伟大工程,但我需要附上您的mex
端点帮助页面WCF配置元数据交换和帮助页面端点
<system.serviceModel>
<services>
<service behaviorConfiguration="MyServiceBehaviors" name="GoalTracker.WcfRestService.Service1">
<endpoint address="mex" binding="mexHttpBinding" contract="GoalTracker.WcfRestService.IService1" />
<endpoint address="" binding="webHttpBinding" contract="GoalTracker.WcfRestService.IService1" />
<endpoint address="Help" kind="webHttpEndpoint"
behaviorConfiguration="RESTEndpointBehavior"
contract="GoalTracker.WcfRestService.IService1" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehaviors">
<!-- Add the following element to your service behavior configuration. -->
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="True"
httpHelpPageEnabled="True"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="RESTEndpointBehavior">
<webHttp helpEnabled="true"/>
</behavior>
</endpointBehaviors>
</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
我只IService1合同有discribed我API的 – Ark
正确的 - 但是,如果你暴露了'mex'端点'mexHttpBinding'它应该有'IMetadataExchange'为合同。这是WCF内置的合同。或者,如果您不希望Mex端点 - REST服务通常不需要 - 您可以删除该端点。 – YK1
当我用mexHttpBinding公开mex端点时,IMetadataExchange不会改变行为。我也可以像使用IService1一样删除使用IMetadataExchange的帮助页面端点和mex。我看到这对他来说不重要。但它仍不能解决我的问题。我无法使用帮助和mex端点 – Ark