WCF 绑定wshttpbinding

<services>

      <service name="DCITS.BEPS.REPORT.ReportService.ReportWCFService" behaviorConfiguration="ServiceBehavior">

        <host>

          <baseAddresses>

            <add baseAddress="http://localhost:9008/REPORT/ReportService"/>

          </baseAddresses>

        </host>

        <endpoint address="" binding="wsHttpBinding" bindingConfiguration="NoneSecurity" contract="DCITS.BEPS.REPORT.IReport.IReportContract"/>

        <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

      </service>

    </services>



    <bindings>

      <wsHttpBinding>

        <binding name="NoneSecurity"

        maxBufferPoolSize="2147483647" sendTimeout="00:00:01" maxReceivedMessageSize="2147483647" receiveTimeout="00:10:00">

          <reliableSession enabled="true"/>

          <security mode="None"/>

        </binding>

      </wsHttpBinding>

    </bindings>
<reliableSession enabled="true"/>在binding节点里要加入这句话,不然没有session就宿主不成功!

你可能感兴趣的:(http)