即使在添加mex绑定后也无法托管wcf服务

时间:2018-01-29 08:27:41

标签: c# wcf localhost hosting iis-express

请找我的网页配置,我在配置文件中添加了mex绑定。但是当前禁用了此服务的元数据发布的错误

<system.serviceModel>
<services>
  <service behaviorConfiguration="ServiceBehaviour" 
        name="Launch.LaunchService">
    <endpoint behaviorConfiguration="web" binding="webHttpBinding" 
        contract="Launch.ILaunchService"/>
    <endpoint address="mex" binding="mexHttpBinding" 
        contract="IMetadataExchange"/>
    <host>
      <baseAddresses>
        <add baseAddress="http://localhost:7777/LaunchService"/>
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <endpointBehaviors>
    <behavior name="web">
      <webHttp/>
    </behavior>
  </endpointBehaviors>
  <serviceBehaviors>
    <behavior name="ServiceBehaviour">
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>
<protocolMapping>
  <add binding="basicHttpsBinding" scheme="https"/>
  <add binding="webHttpBinding" scheme="http"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" 
     multipleSiteBindingsEnabled="true"/>

0 个答案:

没有答案