我尝试为basicHttpBinding启用帮助页面,但我收到了以下错误
The endpoint at 'http://localhost:52568/address.svc/ws' does not have a Binding with the None MessageVersion. 'System.ServiceModel.Description.WebHttpBehavior' is only intended for use with WebHttpBinding or similar bindings.
我猜上面的错误是因为<webHttp helpEnabled="true"/>
仅适用于webHttp Binding ..
现在我的确需要我想为basicHttpBinding启用帮助页面。如何做到这一点?
这里是我的代码
<?xml version="1.0"?>
<service behaviorConfiguration="MyServiceBehavior" name="MCDThirdPartyService.Store">
<endpoint address="ms" binding="basicHttpBinding" contract="MCDThirdPartyService.IStore" behaviorConfiguration="MDS_Service.LoginAspNetAjaxBehavior"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyServiceBehavior" name="MCDThirdPartyService.address">
<endpoint address="ws" binding="basicHttpBinding" contract="MCDThirdPartyService.Iaddress" behaviorConfiguration="MDS_Service.LoginAspNetAjaxBehavior"/>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyServiceBehavior" name="MCDThirdPartyService.Configuration">
<endpoint address="ws" binding="basicHttpBinding" contract="MCDThirdPartyService.IConfiguration" behaviorConfiguration="MDS_Service.LoginAspNetAjaxBehavior" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
<service behaviorConfiguration="MyServiceBehavior" name="MCDThirdPartyService.Order">
<endpoint address="ws" binding="basicHttpBinding" contract="MCDThirdPartyService.IOrder" behaviorConfiguration="MDS_Service.LoginAspNetAjaxBehavior" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" minFreeMemoryPercentageToActivateService="0" aspNetCompatibilityEnabled="true"/>
<behaviors>
<endpointBehaviors>
<behavior name="MDS_Service.LoginAspNetAjaxBehavior">
<webHttp helpEnabled="true"/>
</behavior>
</endpointBehaviors>
<serviceBehaviors>
<behavior name="MyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceThrottling maxConcurrentCalls="100" maxConcurrentInstances="100" maxConcurrentSessions="100" />
</behavior>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>